From 827a2f00d54aa02ab36ee5a85ebc2edcc9ef51a8 Mon Sep 17 00:00:00 2001 From: Anton B Date: Tue, 10 Oct 2023 09:59:04 -0300 Subject: [PATCH] refactor: move meeting remaining time component to common folder --- .../imports/ui/components/breakout-room/component.jsx | 2 +- .../meeting-remaining-time-graphql/component.tsx | 6 +++--- .../meeting-remaining-time-graphql/queries.ts | 0 .../meeting-remaining-time-graphql/styles.ts | 0 .../imports/ui/components/notifications-bar/container.jsx | 4 ++-- .../user-list/user-list-content/breakout-room/component.jsx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename bigbluebutton-html5/imports/ui/components/{notifications-bar => common}/meeting-remaining-time-graphql/component.tsx (100%) rename bigbluebutton-html5/imports/ui/components/{notifications-bar => common}/meeting-remaining-time-graphql/queries.ts (100%) rename bigbluebutton-html5/imports/ui/components/{notifications-bar => common}/meeting-remaining-time-graphql/styles.ts (100%) diff --git a/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx b/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx index 98a8105a0d..c422c01e19 100644 --- a/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/breakout-room/component.jsx @@ -4,7 +4,7 @@ import { Session } from 'meteor/session'; import logger from '/imports/startup/client/logger'; import Styled from './styles'; import Service from './service'; -import MeetingRemainingTime from '../notifications-bar/meeting-remaining-time/container'; +import MeetingRemainingTime from '/imports/ui/components/common/meeting-remaining-time-graphql/component'; import MessageFormContainer from './message-form/container'; import VideoService from '/imports/ui/components/video-provider/service'; import { PANELS, ACTIONS } from '../layout/enums'; diff --git a/bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/component.tsx b/bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/component.tsx similarity index 100% rename from bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/component.tsx rename to bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/component.tsx index b270e7c5c7..bd50f86d54 100644 --- a/bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/component.tsx +++ b/bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/component.tsx @@ -45,15 +45,15 @@ const intlMessages = defineMessages({ }, }); +const METEOR_SETTINGS_APP = Meteor.settings.public.app; +const REMAINING_TIME_ALERT_THRESHOLD_ARRAY: [number] = METEOR_SETTINGS_APP.remainingTimeAlertThresholdArray; + interface MeetingRemainingTimeContainerProps { isBreakoutDuration: boolean | false; fromBreakoutPanel: boolean; displayAlerts: boolean; } -const METEOR_SETTINGS_APP = Meteor.settings.public.app; -const REMAINING_TIME_ALERT_THRESHOLD_ARRAY: [number] = METEOR_SETTINGS_APP.remainingTimeAlertThresholdArray; - interface MeetingRemainingTimeProps { durationInSeconds: number; referenceStartedTime: number; diff --git a/bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/queries.ts b/bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/queries.ts similarity index 100% rename from bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/queries.ts rename to bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/queries.ts diff --git a/bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/styles.ts b/bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/styles.ts similarity index 100% rename from bigbluebutton-html5/imports/ui/components/notifications-bar/meeting-remaining-time-graphql/styles.ts rename to bigbluebutton-html5/imports/ui/components/common/meeting-remaining-time-graphql/styles.ts diff --git a/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx index ebe8d2eebc..72f59b0141 100644 --- a/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/notifications-bar/container.jsx @@ -3,9 +3,9 @@ import { withTracker } from 'meteor/react-meteor-data'; import React, { useEffect } from 'react'; import { defineMessages, injectIntl } from 'react-intl'; import Auth from '/imports/ui/services/auth'; -import { Meetings, MeetingTimeRemaining } from '/imports/api/meetings'; +import Meetings, { MeetingTimeRemaining } from '/imports/api/meetings'; import { isEmpty } from 'radash'; -import MeetingRemainingTime from './meeting-remaining-time/container'; +import MeetingRemainingTime from '/imports/ui/components/common/meeting-remaining-time-graphql/component'; import Styled from './styles'; import { layoutSelectInput, layoutDispatch } from '../layout/context'; import { ACTIONS } from '../layout/enums'; diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx index 86fffdff4e..cba41e5d5b 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/breakout-room/component.jsx @@ -4,7 +4,7 @@ import { defineMessages, injectIntl } from 'react-intl'; import Icon from '/imports/ui/components/common/icon/component'; import Styled from './styles'; import { ACTIONS, PANELS } from '../../../layout/enums'; -import MeetingRemainingTime from '../../../notifications-bar/meeting-remaining-time/container'; +import MeetingRemainingTime from '/imports/ui/components/common/meeting-remaining-time-graphql/component'; const intlMessages = defineMessages({ breakoutTitle: {