Преглед на файлове

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

Move DISABLE_FOCUS_INDICATOR from interface_config.js to config.js (disableModeratorIndicator).
master
robertpin преди 4 години
родител
ревизия
5f5cac0e01
No account linked to committer's email address

+ 3
- 0
config.js Целия файл

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

+ 2
- 1
interface_config.js Целия файл

39
 
39
 
40
     DISABLE_DOMINANT_SPEAKER_INDICATOR: false,
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
      * If true, notifications regarding joining/leaving are no longer displayed.
46
      * If true, notifications regarding joining/leaving are no longer displayed.

+ 1
- 1
lang/main.json Целия файл

570
         "mutedTitle": "You're muted!",
570
         "mutedTitle": "You're muted!",
571
         "mutedRemotelyTitle": "You've been muted by {{moderator}}",
571
         "mutedRemotelyTitle": "You've been muted by {{moderator}}",
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.",
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
         "videoMutedRemotelyDescription": "You can always turn it on again.",
574
         "videoMutedRemotelyDescription": "You can always turn it on again.",
575
         "passwordRemovedRemotely": "$t(lockRoomPasswordUppercase) removed by another participant",
575
         "passwordRemovedRemotely": "$t(lockRoomPasswordUppercase) removed by another participant",
576
         "passwordSetRemotely": "$t(lockRoomPasswordUppercase) set by another participant",
576
         "passwordSetRemotely": "$t(lockRoomPasswordUppercase) set by another participant",

+ 1
- 0
react/features/base/config/configWhitelist.js Целия файл

96
     'disableIncomingMessageSound',
96
     'disableIncomingMessageSound',
97
     'disableJoinLeaveSounds',
97
     'disableJoinLeaveSounds',
98
     'disableLocalVideoFlip',
98
     'disableLocalVideoFlip',
99
+    'disableModeratorIndicator',
99
     'disableNS',
100
     'disableNS',
100
     'disablePolls',
101
     'disablePolls',
101
     'disableProfile',
102
     'disableProfile',

+ 6
- 0
react/features/base/config/reducer.js Целия файл

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
     return newValue;
295
     return newValue;
290
 }
296
 }
291
 
297
 

+ 3
- 1
react/features/filmstrip/components/web/StatusIndicators.js Целия файл

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

+ 4
- 3
react/features/notifications/middleware.js Целия файл

69
         return next(action);
69
         return next(action);
70
     }
70
     }
71
     case PARTICIPANT_UPDATED: {
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
             return next(action);
76
             return next(action);
75
         }
77
         }
76
 
78
 
77
         const { id, role } = action.participant;
79
         const { id, role } = action.participant;
78
-        const state = store.getState();
79
         const localParticipant = getLocalParticipant(state);
80
         const localParticipant = getLocalParticipant(state);
80
 
81
 
81
         if (localParticipant.id !== id) {
82
         if (localParticipant.id !== id) {

Loading…
Отказ
Запис