Bläddra i källkod

feat(config):InsecureRoomNameWarning config option

master
Hristo Terezov 5 år sedan
förälder
incheckning
f0c6e934ce

+ 2
- 1
react/features/conference/components/AbstractInsecureRoomNameLabel.js Visa fil

50
  */
50
  */
51
 export function _mapStateToProps(state: Object): $Shape<Props> {
51
 export function _mapStateToProps(state: Object): $Shape<Props> {
52
     const { room } = state['features/base/conference'];
52
     const { room } = state['features/base/conference'];
53
+    const { enableInsecureRoomNameWarning = false } = state['features/base/config'];
53
 
54
 
54
     return {
55
     return {
55
-        _visible: room && isInsecureRoomName(room)
56
+        _visible: enableInsecureRoomNameWarning && room && isInsecureRoomName(room)
56
     };
57
     };
57
 }
58
 }

+ 8
- 2
react/features/welcome/components/AbstractWelcomePage.js Visa fil

20
      */
20
      */
21
     _calendarEnabled: boolean,
21
     _calendarEnabled: boolean,
22
 
22
 
23
+    /**
24
+     * Whether the insecure room name functionality is enabled or not.
25
+     */
26
+    _enableInsecureRoomNameWarning: boolean,
27
+
23
     /**
28
     /**
24
      * Whether the recent list is enabled
29
      * Whether the recent list is enabled
25
      */
30
      */
214
     _onRoomChange(value: string) {
219
     _onRoomChange(value: string) {
215
         this.setState({
220
         this.setState({
216
             room: value,
221
             room: value,
217
-            insecureRoomName: value && isInsecureRoomName(value)
222
+            insecureRoomName: this.props._enableInsecureRoomNameWarning && value && isInsecureRoomName(value)
218
         });
223
         });
219
     }
224
     }
220
 
225
 
226
      * @returns {ReactElement}
231
      * @returns {ReactElement}
227
      */
232
      */
228
     _renderInsecureRoomNameWarning() {
233
     _renderInsecureRoomNameWarning() {
229
-        if (this.state.insecureRoomName) {
234
+        if (this.props._enableInsecureRoomNameWarning && this.state.insecureRoomName) {
230
             return this._doRenderInsecureRoomNameWarning();
235
             return this._doRenderInsecureRoomNameWarning();
231
         }
236
         }
232
 
237
 
273
 export function _mapStateToProps(state: Object) {
278
 export function _mapStateToProps(state: Object) {
274
     return {
279
     return {
275
         _calendarEnabled: isCalendarEnabled(state),
280
         _calendarEnabled: isCalendarEnabled(state),
281
+        _enableInsecureRoomNameWarning: state['features/base/config'].enableInsecureRoomNameWarning || false,
276
         _recentListEnabled: isRecentListEnabled(),
282
         _recentListEnabled: isRecentListEnabled(),
277
         _room: state['features/base/conference'].room,
283
         _room: state['features/base/conference'].room,
278
         _settings: state['features/base/settings']
284
         _settings: state['features/base/settings']

Laddar…
Avbryt
Spara