Selaa lähdekoodia

fix(config,notifications) fix rendering moderator notifications (#9986)

Move DISABLE_FOCUS_INDICATOR from interface_config.js to config.js (disableModeratorIndicator).
master
robertpin 4 vuotta sitten
vanhempi
commit
5f5cac0e01
No account linked to committer's email address

+ 3
- 0
config.js Näytä tiedosto

@@ -74,6 +74,9 @@ var config = {
74 74
         // callStatsThreshold: 5 // enable callstats for 5% of the users.
75 75
     },
76 76
 
77
+    // Disables moderator indicators.
78
+    // disableModeratorIndicator: false,
79
+
77 80
     // Enables reactions feature.
78 81
     // enableReactions: false,
79 82
 

+ 2
- 1
interface_config.js Näytä tiedosto

@@ -39,7 +39,8 @@ var interfaceConfig = {
39 39
 
40 40
     DISABLE_DOMINANT_SPEAKER_INDICATOR: false,
41 41
 
42
-    DISABLE_FOCUS_INDICATOR: false,
42
+    // Deprecated. Please use disableModeratorIndicator from config.js
43
+    // DISABLE_FOCUS_INDICATOR: false,
43 44
 
44 45
     /**
45 46
      * If true, notifications regarding joining/leaving are no longer displayed.

+ 1
- 1
lang/main.json Näytä tiedosto

@@ -570,7 +570,7 @@
570 570
         "mutedTitle": "You're muted!",
571 571
         "mutedRemotelyTitle": "You've been muted by {{moderator}}",
572 572
         "mutedRemotelyDescription": "You can always unmute when you're ready to speak. Mute back when you're done to keep noise away from the meeting.",
573
-        "videoMutedRemotelyTitle": "Your camera has been turned off by {{moderator}}",
573
+        "videoMutedRemotelyTitle": "Your video has been turned off by {{moderator}}",
574 574
         "videoMutedRemotelyDescription": "You can always turn it on again.",
575 575
         "passwordRemovedRemotely": "$t(lockRoomPasswordUppercase) removed by another participant",
576 576
         "passwordSetRemotely": "$t(lockRoomPasswordUppercase) set by another participant",

+ 1
- 0
react/features/base/config/configWhitelist.js Näytä tiedosto

@@ -96,6 +96,7 @@ export default [
96 96
     'disableIncomingMessageSound',
97 97
     'disableJoinLeaveSounds',
98 98
     'disableLocalVideoFlip',
99
+    'disableModeratorIndicator',
99 100
     'disableNS',
100 101
     'disablePolls',
101 102
     'disableProfile',

+ 6
- 0
react/features/base/config/reducer.js Näytä tiedosto

@@ -286,6 +286,12 @@ function _translateLegacyConfig(oldValue: Object) {
286 286
         };
287 287
     }
288 288
 
289
+    if (oldValue.disableModeratorIndicator === undefined
290
+        && typeof interfaceConfig === 'object'
291
+        && interfaceConfig.hasOwnProperty('DISABLE_FOCUS_INDICATOR')) {
292
+        newValue.disableModeratorIndicator = interfaceConfig.DISABLE_FOCUS_INDICATOR;
293
+    }
294
+
289 295
     return newValue;
290 296
 }
291 297
 

+ 3
- 1
react/features/filmstrip/components/web/StatusIndicators.js Näytä tiedosto

@@ -129,11 +129,13 @@ function _mapStateToProps(state, ownProps) {
129 129
         isAudioMuted = isRemoteTrackMuted(tracks, MEDIA_TYPE.AUDIO, participantID);
130 130
     }
131 131
 
132
+    const { disableModeratorIndicator } = state['features/base/config'];
133
+
132 134
     return {
133 135
         _currentLayout: getCurrentLayout(state),
134 136
         _showAudioMutedIndicator: isAudioMuted,
135 137
         _showModeratorIndicator:
136
-            !interfaceConfig.DISABLE_FOCUS_INDICATOR && participant && participant.role === PARTICIPANT_ROLE.MODERATOR,
138
+            !disableModeratorIndicator && participant && participant.role === PARTICIPANT_ROLE.MODERATOR,
137 139
         _showScreenShareIndicator: isScreenSharing,
138 140
         _showVideoMutedIndicator: isVideoMuted
139 141
     };

+ 4
- 3
react/features/notifications/middleware.js Näytä tiedosto

@@ -69,13 +69,14 @@ MiddlewareRegistry.register(store => next => action => {
69 69
         return next(action);
70 70
     }
71 71
     case PARTICIPANT_UPDATED: {
72
-        if (typeof interfaceConfig === 'undefined') {
73
-            // Do not show the notification for mobile and also when the focus indicator is disabled.
72
+        const state = store.getState();
73
+        const { disableModeratorIndicator } = state['features/base/config'];
74
+
75
+        if (disableModeratorIndicator) {
74 76
             return next(action);
75 77
         }
76 78
 
77 79
         const { id, role } = action.participant;
78
-        const state = store.getState();
79 80
         const localParticipant = getLocalParticipant(state);
80 81
 
81 82
         if (localParticipant.id !== id) {

Loading…
Peruuta
Tallenna