Pārlūkot izejas kodu

feat(jaas) add config for displaying participants stats and conference subject

master
Tudor-Ovidiu Avram 4 gadus atpakaļ
vecāks
revīzija
d49c5a6d8c

+ 6
- 0
config.js Parādīt failu

623
     // otherwise the app doesn't render it.
623
     // otherwise the app doesn't render it.
624
     // moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
624
     // moderatedRoomServiceUrl: 'https://moderated.jitsi-meet.example.com',
625
 
625
 
626
+    // Hides the conference subject
627
+    // hideConferenceSubject: true
628
+
626
     // Hides the conference timer.
629
     // Hides the conference timer.
627
     // hideConferenceTimer: true,
630
     // hideConferenceTimer: true,
628
 
631
 
632
+    // Hides the participants stats
633
+    // hideParticipantsStats: true
634
+
629
     // Sets the conference subject
635
     // Sets the conference subject
630
     // subject: 'Conference Subject',
636
     // subject: 'Conference Subject',
631
 
637
 

+ 2
- 0
react/features/base/config/configWhitelist.js Parādīt failu

117
     'forceTurnRelay',
117
     'forceTurnRelay',
118
     'gatherStats',
118
     'gatherStats',
119
     'googleApiApplicationClientID',
119
     'googleApiApplicationClientID',
120
+    'hideConferenceSubject',
121
+    'hideParticipantsStats',
120
     'hideConferenceTimer',
122
     'hideConferenceTimer',
121
     'hiddenDomain',
123
     'hiddenDomain',
122
     'hideLobbyButton',
124
     'hideLobbyButton',

+ 5
- 2
react/features/conference/components/native/NavigationBar.js Parādīt failu

95
  * @returns {Props}
95
  * @returns {Props}
96
  */
96
  */
97
 function _mapStateToProps(state) {
97
 function _mapStateToProps(state) {
98
+    const { hideConferenceTimer, hideConferenceSubject } = state['features/base/config'];
99
+
98
     return {
100
     return {
99
         _conferenceTimerEnabled:
101
         _conferenceTimerEnabled:
100
-            getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !state['features/base/config'].hideConferenceTimer,
102
+            getFeatureFlag(state, CONFERENCE_TIMER_ENABLED, true) && !hideConferenceTimer,
101
         _meetingName: getConferenceName(state),
103
         _meetingName: getConferenceName(state),
102
-        _meetingNameEnabled: getFeatureFlag(state, MEETING_NAME_ENABLED, true),
104
+        _meetingNameEnabled:
105
+            getFeatureFlag(state, MEETING_NAME_ENABLED, true) && !hideConferenceSubject,
103
         _visible: isToolboxVisible(state)
106
         _visible: isToolboxVisible(state)
104
     };
107
     };
105
 }
108
 }

+ 12
- 4
react/features/conference/components/web/Subject.js Parādīt failu

25
      */
25
      */
26
     _showParticipantCount: boolean,
26
     _showParticipantCount: boolean,
27
 
27
 
28
+    /**
29
+     * Whether the conference subject should be shown or not.
30
+     */
31
+    _showSubject: boolean,
32
+
28
     /**
33
     /**
29
      * The subject or the of the conference.
34
      * The subject or the of the conference.
30
      * Falls back to conference name.
35
      * Falls back to conference name.
51
      * @returns {ReactElement}
56
      * @returns {ReactElement}
52
      */
57
      */
53
     render() {
58
     render() {
54
-        const { _hideConferenceTimer, _showParticipantCount, _subject, _visible } = this.props;
59
+        const { _hideConferenceTimer, _showParticipantCount, _showSubject, _subject, _visible } = this.props;
55
 
60
 
56
         return (
61
         return (
57
             <div className = { `subject ${_visible ? 'visible' : ''}` }>
62
             <div className = { `subject ${_visible ? 'visible' : ''}` }>
58
-                <span className = 'subject-text'>{ _subject }</span>
63
+                { _showSubject && <span className = 'subject-text'>{ _subject }</span>}
59
                 { _showParticipantCount && <ParticipantsCount /> }
64
                 { _showParticipantCount && <ParticipantsCount /> }
60
                 { !_hideConferenceTimer && <ConferenceTimer /> }
65
                 { !_hideConferenceTimer && <ConferenceTimer /> }
61
             </div>
66
             </div>
72
  * @returns {{
77
  * @returns {{
73
  *     _hideConferenceTimer: boolean,
78
  *     _hideConferenceTimer: boolean,
74
  *     _showParticipantCount: boolean,
79
  *     _showParticipantCount: boolean,
80
+ *     _showSubject: boolean,
75
  *     _subject: string,
81
  *     _subject: string,
76
  *     _visible: boolean
82
  *     _visible: boolean
77
  * }}
83
  * }}
78
  */
84
  */
79
 function _mapStateToProps(state) {
85
 function _mapStateToProps(state) {
80
     const participantCount = getParticipantCount(state);
86
     const participantCount = getParticipantCount(state);
87
+    const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config'];
81
 
88
 
82
     return {
89
     return {
83
-        _hideConferenceTimer: Boolean(state['features/base/config'].hideConferenceTimer),
84
-        _showParticipantCount: participantCount > 2,
90
+        _hideConferenceTimer: Boolean(hideConferenceTimer),
91
+        _showParticipantCount: participantCount > 2 && !hideParticipantsStats,
92
+        _showSubject: !hideConferenceSubject,
85
         _subject: getConferenceName(state),
93
         _subject: getConferenceName(state),
86
         _visible: isToolboxVisible(state) && participantCount > 1
94
         _visible: isToolboxVisible(state) && participantCount > 1
87
     };
95
     };

Notiek ielāde…
Atcelt
Saglabāt