Просмотр исходного кода

feat(ConferenceTimer): Add config option to hide.

j8
Hristo Terezov 4 лет назад
Родитель
Сommit
5cae5985c0

+ 6
- 0
config.js Просмотреть файл

@@ -616,6 +616,12 @@ var config = {
616 616
     // otherwise the app doesn't render it.
617 617
     // moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
618 618
 
619
+    // Hides the conference timer.
620
+    // hideConferenceTimer: true,
621
+
622
+    // Sets the conference subject
623
+    // subject: 'Conference Subject',
624
+
619 625
     // List of undocumented settings used in jitsi-meet
620 626
     /**
621 627
      _immediateReloadThreshold

+ 1
- 0
react/features/base/config/configWhitelist.js Просмотреть файл

@@ -116,6 +116,7 @@ export default [
116 116
     'forceJVB121Ratio',
117 117
     'gatherStats',
118 118
     'googleApiApplicationClientID',
119
+    'hideConferenceTimer',
119 120
     'hiddenDomain',
120 121
     'hideLobbyButton',
121 122
     'hosts',

+ 2
- 1
react/features/conference/components/native/NavigationBar.js Просмотреть файл

@@ -96,7 +96,8 @@ class NavigationBar extends Component<Props> {
96 96
  */
97 97
 function _mapStateToProps(state) {
98 98
     return {
99
-        _conferenceTimerEnabled: getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true),
99
+        _conferenceTimerEnabled:
100
+            getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !state['features/base/config'].hideConferenceTimer,
100 101
         _meetingName: getConferenceName(state),
101 102
         _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
102 103
         _visible: isToolboxVisible(state)

+ 11
- 3
react/features/conference/components/web/Subject.js Просмотреть файл

@@ -16,7 +16,12 @@ import ParticipantsCount from './ParticipantsCount';
16 16
 type Props = {
17 17
 
18 18
     /**
19
-     * Whether then participant count should be shown or not.
19
+     * Whether the conference timer should be shown or not.
20
+     */
21
+    _hideConferenceTimer: Boolean,
22
+
23
+    /**
24
+     * Whether the participant count should be shown or not.
20 25
      */
21 26
     _showParticipantCount: boolean,
22 27
 
@@ -46,13 +51,13 @@ class Subject extends Component<Props> {
46 51
      * @returns {ReactElement}
47 52
      */
48 53
     render() {
49
-        const { _showParticipantCount, _subject, _visible } = this.props;
54
+        const { _hideConferenceTimer, _showParticipantCount, _subject, _visible } = this.props;
50 55
 
51 56
         return (
52 57
             <div className = { `subject ${_visible ? 'visible' : ''}` }>
53 58
                 <span className = 'subject-text'>{ _subject }</span>
54 59
                 { _showParticipantCount && <ParticipantsCount /> }
55
-                <ConferenceTimer />
60
+                { !_hideConferenceTimer && <ConferenceTimer /> }
56 61
             </div>
57 62
         );
58 63
     }
@@ -65,6 +70,8 @@ class Subject extends Component<Props> {
65 70
  * @param {Object} state - The Redux state.
66 71
  * @private
67 72
  * @returns {{
73
+ *     _hideConferenceTimer: boolean,
74
+ *     _showParticipantCount: boolean,
68 75
  *     _subject: string,
69 76
  *     _visible: boolean
70 77
  * }}
@@ -73,6 +80,7 @@ function _mapStateToProps(state) {
73 80
     const participantCount = getParticipantCount(state);
74 81
 
75 82
     return {
83
+        _hideConferenceTimer: Boolean(state['features/base/config'].hideConferenceTimer),
76 84
         _showParticipantCount: participantCount > 2,
77 85
         _subject: getConferenceName(state),
78 86
         _visible: isToolboxVisible(state) && participantCount > 1

Загрузка…
Отмена
Сохранить