Bläddra i källkod

Merge pull request #8356 from jitsi/tavram/top

feat(jaas) add config for displaying participants stats and conferenc…
j8
Avram Tudor 4 år sedan
förälder
incheckning
80d789879c
Inget konto är kopplat till bidragsgivarens mejladress

+ 6
- 0
config.js Visa fil

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

+ 2
- 0
react/features/base/config/configWhitelist.js Visa fil

@@ -117,6 +117,8 @@ export default [
117 117
     'forceTurnRelay',
118 118
     'gatherStats',
119 119
     'googleApiApplicationClientID',
120
+    'hideConferenceSubject',
121
+    'hideParticipantsStats',
120 122
     'hideConferenceTimer',
121 123
     'hiddenDomain',
122 124
     'hideLobbyButton',

+ 5
- 2
react/features/conference/components/native/NavigationBar.js Visa fil

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

+ 12
- 4
react/features/conference/components/web/Subject.js Visa fil

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

Laddar…
Avbryt
Spara