From 5cae5985c00fd8604d35eaadf2bde92ef0774dc8 Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Thu, 3 Dec 2020 15:49:08 -0600 Subject: [PATCH] feat(ConferenceTimer): Add config option to hide. --- config.js | 6 ++++++ react/features/base/config/configWhitelist.js | 1 + .../conference/components/native/NavigationBar.js | 3 ++- .../features/conference/components/web/Subject.js | 14 +++++++++++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/config.js b/config.js index 6df14df59..f12b33bae 100644 --- a/config.js +++ b/config.js @@ -616,6 +616,12 @@ var config = { // otherwise the app doesn't render it. // moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com', + // Hides the conference timer. + // hideConferenceTimer: true, + + // Sets the conference subject + // subject: 'Conference Subject', + // List of undocumented settings used in jitsi-meet /** _immediateReloadThreshold diff --git a/react/features/base/config/configWhitelist.js b/react/features/base/config/configWhitelist.js index 34f9601b1..9a4f6330b 100644 --- a/react/features/base/config/configWhitelist.js +++ b/react/features/base/config/configWhitelist.js @@ -116,6 +116,7 @@ export default [ 'forceJVB121Ratio', 'gatherStats', 'googleApiApplicationClientID', + 'hideConferenceTimer', 'hiddenDomain', 'hideLobbyButton', 'hosts', diff --git a/react/features/conference/components/native/NavigationBar.js b/react/features/conference/components/native/NavigationBar.js index 3a73af4d9..2b8a085af 100644 --- a/react/features/conference/components/native/NavigationBar.js +++ b/react/features/conference/components/native/NavigationBar.js @@ -96,7 +96,8 @@ class NavigationBar extends Component { */ function _mapStateToProps(state) { return { - _conferenceTimerEnabled: getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true), + _conferenceTimerEnabled: + getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !state['features/base/config'].hideConferenceTimer, _meetingName: getConferenceName(state), _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true), _visible: isToolboxVisible(state) diff --git a/react/features/conference/components/web/Subject.js b/react/features/conference/components/web/Subject.js index 4405a8963..a8e2f8730 100644 --- a/react/features/conference/components/web/Subject.js +++ b/react/features/conference/components/web/Subject.js @@ -16,7 +16,12 @@ import ParticipantsCount from './ParticipantsCount'; type Props = { /** - * Whether then participant count should be shown or not. + * Whether the conference timer should be shown or not. + */ + _hideConferenceTimer: Boolean, + + /** + * Whether the participant count should be shown or not. */ _showParticipantCount: boolean, @@ -46,13 +51,13 @@ class Subject extends Component { * @returns {ReactElement} */ render() { - const { _showParticipantCount, _subject, _visible } = this.props; + const { _hideConferenceTimer, _showParticipantCount, _subject, _visible } = this.props; return (
{ _subject } { _showParticipantCount && } - + { !_hideConferenceTimer && }
); } @@ -65,6 +70,8 @@ class Subject extends Component { * @param {Object} state - The Redux state. * @private * @returns {{ + * _hideConferenceTimer: boolean, + * _showParticipantCount: boolean, * _subject: string, * _visible: boolean * }} @@ -73,6 +80,7 @@ function _mapStateToProps(state) { const participantCount = getParticipantCount(state); return { + _hideConferenceTimer: Boolean(state['features/base/config'].hideConferenceTimer), _showParticipantCount: participantCount > 2, _subject: getConferenceName(state), _visible: isToolboxVisible(state) && participantCount > 1