Parcourir la source

feat(rn,security) add security dialog

j8
Calinteodor il y a 4 ans
Parent
révision
bf3726cb93
Aucun compte lié à l'adresse e-mail de l'auteur
29 fichiers modifiés avec 726 ajouts et 415 suppressions
  1. 2
    2
      lang/main.json
  2. 1
    1
      modules/API/API.js
  3. 47
    10
      react/features/base/dialog/components/native/styles.js
  4. 25
    0
      react/features/lobby/actions.any.js
  5. 1
    17
      react/features/lobby/actions.web.js
  6. 0
    78
      react/features/lobby/components/native/LobbyModeButton.js
  7. 58
    0
      react/features/lobby/components/native/LobbyModeSwitch.js
  8. 0
    1
      react/features/lobby/components/native/index.js
  9. 13
    0
      react/features/lobby/components/native/styles.js
  10. 5
    25
      react/features/room-lock/actions.js
  11. 0
    101
      react/features/room-lock/components/RoomLockButton.js
  12. 0
    140
      react/features/room-lock/components/RoomLockPrompt.native.js
  13. 0
    0
      react/features/room-lock/components/RoomLockPrompt.web.js
  14. 83
    0
      react/features/room-lock/components/RoomLockSwitch.js
  15. 0
    2
      react/features/room-lock/components/index.js
  16. 16
    0
      react/features/room-lock/components/styles.js
  17. 1
    3
      react/features/room-lock/middleware.js
  18. 6
    15
      react/features/security/components/security-dialog/SecurityDialogButton.js
  19. 1
    0
      react/features/security/components/security-dialog/_.native.js
  20. 1
    0
      react/features/security/components/security-dialog/_.web.js
  21. 1
    4
      react/features/security/components/security-dialog/index.js
  22. 444
    0
      react/features/security/components/security-dialog/native/SecurityDialog.js
  23. 4
    0
      react/features/security/components/security-dialog/native/index.js
  24. 2
    2
      react/features/security/components/security-dialog/web/PasswordForm.js
  25. 2
    2
      react/features/security/components/security-dialog/web/PasswordSection.js
  26. 7
    7
      react/features/security/components/security-dialog/web/SecurityDialog.js
  27. 3
    0
      react/features/security/components/security-dialog/web/index.js
  28. 2
    4
      react/features/toolbox/components/native/OverflowMenu.js
  29. 1
    1
      react/features/toolbox/components/web/Toolbox.js

+ 2
- 2
lang/main.json Voir le fichier

@@ -226,7 +226,7 @@
226 226
         "liveStreamingDisabledBecauseOfActiveRecordingTooltip": "Not possible while recording is active",
227 227
         "liveStreamingDisabledTooltip": "Start live stream disabled.",
228 228
         "lockMessage": "Failed to lock the conference.",
229
-        "lockRoom": "Add meeting $t(lockRoomPasswordUppercase)",
229
+        "lockRoom": "Add meeting $t(lockRoomPassword)",
230 230
         "lockTitle": "Lock failed",
231 231
         "logoutQuestion": "Are you sure you want to logout and stop the conference?",
232 232
         "login": "Login",
@@ -525,7 +525,7 @@
525 525
         "oldElectronClientDescription2": "latest build",
526 526
         "oldElectronClientDescription3": " now!"
527 527
     },
528
-    "passwordSetRemotely": "set by another participant",
528
+    "passwordSetRemotely": "Set by another participant",
529 529
     "passwordDigitsOnly": "Up to {{number}} digits",
530 530
     "poweredby": "powered by",
531 531
     "prejoin": {

+ 1
- 1
modules/API/API.js Voir le fichier

@@ -38,7 +38,7 @@ import {
38 38
     resizeLargeVideo,
39 39
     selectParticipantInLargeVideo
40 40
 } from '../../react/features/large-video/actions';
41
-import { toggleLobbyMode } from '../../react/features/lobby/actions.web';
41
+import { toggleLobbyMode } from '../../react/features/lobby/actions';
42 42
 import { RECORDING_TYPES } from '../../react/features/recording/constants';
43 43
 import { getActiveSession } from '../../react/features/recording/functions';
44 44
 import { toggleTileView, setTileView } from '../../react/features/video-layout';

+ 47
- 10
react/features/base/dialog/components/native/styles.js Voir le fichier

@@ -116,6 +116,24 @@ const brandedDialogText = {
116 116
     textAlign: 'center'
117 117
 };
118 118
 
119
+const brandedDialogLabelStyle = {
120
+    color: schemeColor('text'),
121
+    flexShrink: 1,
122
+    fontSize: MD_FONT_SIZE,
123
+    opacity: 0.90
124
+};
125
+
126
+const brandedDialogItemContainerStyle = {
127
+    alignItems: 'center',
128
+    flexDirection: 'row',
129
+    height: MD_ITEM_HEIGHT
130
+};
131
+
132
+const brandedDialogIconStyle = {
133
+    color: schemeColor('icon'),
134
+    fontSize: 24
135
+};
136
+
119 137
 export const inputDialog = {
120 138
     bottomField: {
121 139
         marginBottom: 0
@@ -145,28 +163,22 @@ ColorSchemeRegistry.register('BottomSheet', {
145 163
          * Style for the {@code Icon} element in a generic item of the menu.
146 164
          */
147 165
         iconStyle: {
148
-            color: schemeColor('icon'),
149
-            fontSize: 24
166
+            ...brandedDialogIconStyle
150 167
         },
151 168
 
152 169
         /**
153 170
          * Style for the label in a generic item rendered in the menu.
154 171
          */
155 172
         labelStyle: {
156
-            color: schemeColor('text'),
157
-            flexShrink: 1,
158
-            fontSize: MD_FONT_SIZE,
159
-            marginLeft: 32,
160
-            opacity: 0.90
173
+            ...brandedDialogLabelStyle,
174
+            marginLeft: 32
161 175
         },
162 176
 
163 177
         /**
164 178
          * Container style for a generic item rendered in the menu.
165 179
          */
166 180
         style: {
167
-            alignItems: 'center',
168
-            flexDirection: 'row',
169
-            height: MD_ITEM_HEIGHT
181
+            ...brandedDialogItemContainerStyle
170 182
         },
171 183
 
172 184
         /**
@@ -258,3 +270,28 @@ ColorSchemeRegistry.register('Dialog', {
258 270
         borderTopWidth: 1
259 271
     }
260 272
 });
273
+
274
+ColorSchemeRegistry.register('SecurityDialog', {
275
+    /**
276
+     * Field on an input dialog.
277
+     */
278
+    field: {
279
+        borderBottomWidth: 1,
280
+        borderColor: schemeColor('border'),
281
+        color: schemeColor('text'),
282
+        fontSize: 14,
283
+        paddingBottom: 8
284
+    },
285
+
286
+    text: {
287
+        color: schemeColor('text'),
288
+        fontSize: 14,
289
+        marginTop: 8
290
+    },
291
+
292
+    title: {
293
+        color: schemeColor('text'),
294
+        fontSize: 18,
295
+        fontWeight: 'bold'
296
+    }
297
+});

+ 25
- 0
react/features/lobby/actions.any.js Voir le fichier

@@ -0,0 +1,25 @@
1
+// @flow
2
+
3
+import { type Dispatch } from 'redux';
4
+
5
+import {
6
+    getCurrentConference
7
+} from '../base/conference';
8
+
9
+/**
10
+ * Action to toggle lobby mode on or off.
11
+ *
12
+ * @param {boolean} enabled - The desired (new) state of the lobby mode.
13
+ * @returns {Function}
14
+ */
15
+export function toggleLobbyMode(enabled: boolean) {
16
+    return async (dispatch: Dispatch<any>, getState: Function) => {
17
+        const conference = getCurrentConference(getState);
18
+
19
+        if (enabled) {
20
+            conference.enableLobby();
21
+        } else {
22
+            conference.disableLobby();
23
+        }
24
+    };
25
+}

+ 1
- 17
react/features/lobby/actions.web.js Voir le fichier

@@ -11,6 +11,7 @@ import {
11 11
 } from '../base/conference';
12 12
 import { hideDialog, openDialog } from '../base/dialog';
13 13
 import { getLocalParticipant } from '../base/participants';
14
+export * from './actions.any';
14 15
 
15 16
 import {
16 17
     KNOCKING_PARTICIPANT_ARRIVED_OR_UPDATED,
@@ -198,20 +199,3 @@ export function startKnocking() {
198 199
     };
199 200
 }
200 201
 
201
-/**
202
- * Action to toggle lobby mode on or off.
203
- *
204
- * @param {boolean} enabled - The desired (new) state of the lobby mode.
205
- * @returns {Function}
206
- */
207
-export function toggleLobbyMode(enabled: boolean) {
208
-    return async (dispatch: Dispatch<any>, getState: Function) => {
209
-        const conference = getCurrentConference(getState);
210
-
211
-        if (enabled) {
212
-            conference.enableLobby();
213
-        } else {
214
-            conference.disableLobby();
215
-        }
216
-    };
217
-}

+ 0
- 78
react/features/lobby/components/native/LobbyModeButton.js Voir le fichier

@@ -1,78 +0,0 @@
1
-// @flow
2
-
3
-import { getCurrentConference } from '../../../base/conference';
4
-import { translate } from '../../../base/i18n';
5
-import { IconMeetingUnlocked, IconMeetingLocked } from '../../../base/icons';
6
-import { isLocalParticipantModerator } from '../../../base/participants';
7
-import { connect } from '../../../base/redux';
8
-import AbstractButton, { type Props as AbstractProps } from '../../../base/toolbox/components/AbstractButton';
9
-import { showDisableLobbyModeDialog, showEnableLobbyModeDialog } from '../../actions.native';
10
-
11
-type Props = AbstractProps & {
12
-
13
-    /**
14
-     * The Redux Dispatch function.
15
-     */
16
-    dispatch: Function,
17
-
18
-    /**
19
-     * True if the lobby mode is currently enabled for this conference.
20
-     */
21
-    lobbyEnabled: boolean
22
-};
23
-
24
-/**
25
- * Component to render the lobby mode initiator button.
26
- */
27
-class LobbyModeButton extends AbstractButton<Props, any> {
28
-    accessibilityLabel = 'toolbar.accessibilityLabel.lobbyButton';
29
-    icon = IconMeetingUnlocked;
30
-    label = 'toolbar.lobbyButtonEnable';
31
-    toggledLabel = 'toolbar.lobbyButtonDisable'
32
-    toggledIcon = IconMeetingLocked;
33
-
34
-    /**
35
-     * Callback for the click event of the button.
36
-     *
37
-     * @returns {void}
38
-     */
39
-    _handleClick() {
40
-        const { dispatch } = this.props;
41
-
42
-        if (this._isToggled()) {
43
-            dispatch(showDisableLobbyModeDialog());
44
-        } else {
45
-            dispatch(showEnableLobbyModeDialog());
46
-        }
47
-    }
48
-
49
-    /**
50
-     * Function to define the button state.
51
-     *
52
-     * @returns {boolean}
53
-     */
54
-    _isToggled() {
55
-        return this.props.lobbyEnabled;
56
-    }
57
-}
58
-
59
-/**
60
- * Maps part of the Redux store to the props of this component.
61
- *
62
- * @param {Object} state - The Redux state.
63
- * @param {Props} ownProps - The own props of the component.
64
- * @returns {Props}
65
- */
66
-export function _mapStateToProps(state: Object): $Shape<Props> {
67
-    const conference = getCurrentConference(state);
68
-    const { lobbyEnabled } = state['features/lobby'];
69
-    const { hideLobbyButton } = state['features/base/config'];
70
-    const lobbySupported = conference && conference.isLobbySupported();
71
-
72
-    return {
73
-        lobbyEnabled,
74
-        visible: lobbySupported && isLocalParticipantModerator(state) && !hideLobbyButton
75
-    };
76
-}
77
-
78
-export default translate(connect(_mapStateToProps)(LobbyModeButton));

+ 58
- 0
react/features/lobby/components/native/LobbyModeSwitch.js Voir le fichier

@@ -0,0 +1,58 @@
1
+// @flow
2
+
3
+import React from 'react';
4
+import { Switch, View } from 'react-native';
5
+
6
+import { translate } from '../../../base/i18n';
7
+import { connect } from '../../../base/redux';
8
+
9
+import styles, {
10
+    ENABLED_THUMB_COLOR,
11
+    ENABLED_TRACK_COLOR,
12
+    DISABLED_THUMB_COLOR
13
+} from './styles';
14
+
15
+/**
16
+ * The type of the React {@code Component} props of {@link LobbyModeSwitch}.
17
+ */
18
+type Props = {
19
+
20
+    /**
21
+     * True if the lobby mode is currently enabled for this conference.
22
+     */
23
+    lobbyEnabled: boolean,
24
+
25
+    /**
26
+     * Callback to be invoked when handling enable-disable lobby mode switch.
27
+     */
28
+    onToggleLobbyMode: Function
29
+};
30
+
31
+/**
32
+ * Component meant to Enable/Disable lobby mode.
33
+ *
34
+ * @returns {React$Element<any>}
35
+ */
36
+function LobbyModeSwitch(
37
+        {
38
+            lobbyEnabled,
39
+            onToggleLobbyMode
40
+        }: Props) {
41
+
42
+    return (
43
+        <View style = { styles.lobbySwitchContainer }>
44
+            <Switch
45
+                onValueChange = { onToggleLobbyMode }
46
+                style = { styles.lobbySwitchIcon }
47
+                thumbColor = {
48
+                    lobbyEnabled
49
+                        ? ENABLED_THUMB_COLOR
50
+                        : DISABLED_THUMB_COLOR
51
+                }
52
+                trackColor = {{ true: ENABLED_TRACK_COLOR }}
53
+                value = { lobbyEnabled } />
54
+        </View>
55
+    );
56
+}
57
+
58
+export default translate(connect()(LobbyModeSwitch));

+ 0
- 1
react/features/lobby/components/native/index.js Voir le fichier

@@ -3,5 +3,4 @@
3 3
 export { default as DisableLobbyModeDialog } from './DisableLobbyModeDialog';
4 4
 export { default as EnableLobbyModeDialog } from './EnableLobbyModeDialog';
5 5
 export { default as KnockingParticipantList } from './KnockingParticipantList';
6
-export { default as LobbyModeButton } from './LobbyModeButton';
7 6
 export { default as LobbyScreen } from './LobbyScreen';

+ 13
- 0
react/features/lobby/components/native/styles.js Voir le fichier

@@ -4,6 +4,10 @@ import { ColorPalette } from '../../../base/styles';
4 4
 
5 5
 const SECONDARY_COLOR = '#B8C7E0';
6 6
 
7
+export const ENABLED_THUMB_COLOR = ColorPalette.blueHighlight;
8
+export const ENABLED_TRACK_COLOR = ColorPalette.blue;
9
+export const DISABLED_THUMB_COLOR = ColorPalette.darkGrey;
10
+
7 11
 export default {
8 12
     button: {
9 13
         alignItems: 'center',
@@ -138,5 +142,14 @@ export default {
138 142
 
139 143
     knockingParticipantListText: {
140 144
         color: 'white'
145
+    },
146
+
147
+    lobbySwitchContainer: {
148
+        flexDirection: 'column',
149
+        marginTop: 16
150
+    },
151
+
152
+    lobbySwitchIcon: {
153
+        alignSelf: 'flex-end'
141 154
     }
142 155
 };

+ 5
- 25
react/features/room-lock/actions.js Voir le fichier

@@ -12,34 +12,12 @@ import {
12 12
     setPassword
13 13
 } from '../base/conference';
14 14
 import { hideDialog, openDialog } from '../base/dialog';
15
+import { SecurityDialog } from '../security/components/security-dialog';
15 16
 
16
-import { PasswordRequiredPrompt, RoomLockPrompt } from './components';
17
+import { PasswordRequiredPrompt } from './components';
17 18
 
18 19
 declare var APP: Object;
19 20
 
20
-/**
21
- * Begins a (user) request to lock a specific conference/room.
22
- *
23
- * @param {JitsiConference|undefined} conference - The JitsiConference to lock
24
- * if specified or undefined if the current JitsiConference is to be locked.
25
- * @returns {Function}
26
- */
27
-export function beginRoomLockRequest(conference: ?Object) {
28
-    return (dispatch: Function, getState: Function) => {
29
-        if (typeof conference === 'undefined') {
30
-            // eslint-disable-next-line no-param-reassign
31
-            conference = getState()['features/base/conference'].conference;
32
-        }
33
-        if (conference) {
34
-            const passwordNumberOfDigits = getState()['features/base/config'].roomPasswordNumberOfDigits;
35
-
36
-            dispatch(openDialog(RoomLockPrompt, {
37
-                conference,
38
-                passwordNumberOfDigits }));
39
-        }
40
-    };
41
-}
42
-
43 21
 /**
44 22
  * Cancels a prompt for a password to join a specific conference/room.
45 23
  *
@@ -99,7 +77,7 @@ export function endRoomLockRequest(
99 77
             = password
100 78
                 ? dispatch(setPassword(conference, conference.lock, password))
101 79
                 : Promise.resolve();
102
-        const endRoomLockRequest_ = () => dispatch(hideDialog(RoomLockPrompt));
80
+        const endRoomLockRequest_ = () => dispatch(hideDialog(SecurityDialog));
103 81
 
104 82
         setPassword_.then(endRoomLockRequest_, endRoomLockRequest_);
105 83
     };
@@ -137,3 +115,5 @@ export function unlockRoom() {
137 115
         ));
138 116
     };
139 117
 }
118
+
119
+

+ 0
- 101
react/features/room-lock/components/RoomLockButton.js Voir le fichier

@@ -1,101 +0,0 @@
1
-// @flow
2
-
3
-import { MEETING_PASSWORD_ENABLED, getFeatureFlag } from '../../base/flags';
4
-import { translate } from '../../base/i18n';
5
-import { IconRoomLock, IconRoomUnlock } from '../../base/icons';
6
-import { isLocalParticipantModerator } from '../../base/participants';
7
-import { connect } from '../../base/redux';
8
-import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
9
-import { beginRoomLockRequest, unlockRoom } from '../actions';
10
-
11
-type Props = AbstractButtonProps & {
12
-
13
-    /**
14
-     * Whether the current local participant is a moderator, therefore is
15
-     * allowed to lock or unlock the conference.
16
-     */
17
-    _localParticipantModerator: boolean,
18
-
19
-    /**
20
-     * Whether the current conference is locked or not.
21
-     */
22
-    _locked: boolean,
23
-
24
-    /**
25
-     * The redux {@code dispatch} function.
26
-     */
27
-    dispatch: Function
28
-};
29
-
30
-/**
31
- * An implementation of a button for locking / unlocking a room.
32
- */
33
-class RoomLockButton extends AbstractButton<Props, *> {
34
-    accessibilityLabel = 'toolbar.accessibilityLabel.lockRoom';
35
-    icon = IconRoomLock;
36
-    label = 'dialog.lockRoom';
37
-    toggledIcon = IconRoomUnlock;
38
-    toggledLabel = 'dialog.unlockRoom';
39
-
40
-    /**
41
-     * Handles clicking / pressing the button.
42
-     *
43
-     * @override
44
-     * @protected
45
-     * @returns {void}
46
-     */
47
-    _handleClick() {
48
-        const { dispatch, _locked } = this.props;
49
-
50
-        if (_locked) {
51
-            dispatch(unlockRoom());
52
-        } else {
53
-            dispatch(beginRoomLockRequest());
54
-        }
55
-    }
56
-
57
-    /**
58
-     * Indicates whether this button is disabled or not.
59
-     *
60
-     * @override
61
-     * @protected
62
-     * @returns {boolean}
63
-     */
64
-    _isDisabled() {
65
-        return !this.props._localParticipantModerator;
66
-    }
67
-
68
-    /**
69
-     * Indicates whether this button is in toggled state or not.
70
-     *
71
-     * @override
72
-     * @protected
73
-     * @returns {boolean}
74
-     */
75
-    _isToggled() {
76
-        return this.props._locked;
77
-    }
78
-}
79
-
80
-/**
81
- * Maps (parts of) the redux state to the associated props for the
82
- * {@code RoomLockButton} component.
83
- *
84
- * @param {Object} state - The Redux state.
85
- * @param {Object} ownProps - The properties explicitly passed to the component instance.
86
- * @private
87
- * @returns {Props}
88
- */
89
-function _mapStateToProps(state, ownProps): Object {
90
-    const { conference, locked } = state['features/base/conference'];
91
-    const enabled = getFeatureFlag(state, MEETING_PASSWORD_ENABLED, true);
92
-    const { visible = enabled } = ownProps;
93
-
94
-    return {
95
-        _localParticipantModerator: Boolean(conference && isLocalParticipantModerator(state)),
96
-        _locked: Boolean(conference && locked),
97
-        visible
98
-    };
99
-}
100
-
101
-export default translate(connect(_mapStateToProps)(RoomLockButton));

+ 0
- 140
react/features/room-lock/components/RoomLockPrompt.native.js Voir le fichier

@@ -1,140 +0,0 @@
1
-// @flow
2
-
3
-import React, { Component } from 'react';
4
-import type { Dispatch } from 'redux';
5
-
6
-import { InputDialog } from '../../base/dialog';
7
-import { connect } from '../../base/redux';
8
-import { endRoomLockRequest } from '../actions';
9
-
10
-/**
11
- * The style of the {@link TextInput} rendered by {@code RoomLockPrompt}. As it
12
- * requests the entry of a password, {@code TextInput} automatically correcting
13
- * the entry of the password is a pain to deal with as a user.
14
- */
15
-const _TEXT_INPUT_PROPS = {
16
-    autoCapitalize: 'none',
17
-    autoCorrect: false
18
-};
19
-
20
-/**
21
- * The type of the React {@code Component} props of {@link RoomLockPrompt}.
22
- */
23
-type Props = {
24
-
25
-    /**
26
-     * The JitsiConference which requires a password.
27
-     */
28
-    conference: Object,
29
-
30
-    /**
31
-     * The number of digits to be used in the password.
32
-     */
33
-    passwordNumberOfDigits: ?number,
34
-
35
-    /**
36
-     * Redux store dispatch function.
37
-     */
38
-    dispatch: Dispatch<any>
39
-};
40
-
41
-/**
42
- * Implements a React Component which prompts the user for a password to lock  a
43
- * conference/room.
44
- */
45
-class RoomLockPrompt extends Component<Props> {
46
-    /**
47
-     * Initializes a new RoomLockPrompt instance.
48
-     *
49
-     * @param {Props} props - The read-only properties with which the new
50
-     * instance is to be initialized.
51
-     */
52
-    constructor(props: Props) {
53
-        super(props);
54
-
55
-        // Bind event handlers so they are only bound once per instance.
56
-        this._onCancel = this._onCancel.bind(this);
57
-        this._onSubmit = this._onSubmit.bind(this);
58
-        this._validateInput = this._validateInput.bind(this);
59
-    }
60
-
61
-    /**
62
-     * Implements React's {@link Component#render()}.
63
-     *
64
-     * @inheritdoc
65
-     * @returns {ReactElement}
66
-     */
67
-    render() {
68
-        let textInputProps = _TEXT_INPUT_PROPS;
69
-
70
-        if (this.props.passwordNumberOfDigits) {
71
-            textInputProps = {
72
-                ...textInputProps,
73
-                keyboardType: 'number-pad',
74
-                maxLength: this.props.passwordNumberOfDigits
75
-            };
76
-        }
77
-
78
-        return (
79
-            <InputDialog
80
-                contentKey = 'security.about'
81
-                onCancel = { this._onCancel }
82
-                onSubmit = { this._onSubmit }
83
-                textInputProps = { textInputProps }
84
-                validateInput = { this._validateInput } />
85
-        );
86
-    }
87
-
88
-    _onCancel: () => boolean;
89
-
90
-    /**
91
-     * Notifies this prompt that it has been dismissed by cancel.
92
-     *
93
-     * @private
94
-     * @returns {boolean} True to hide this dialog/prompt; otherwise, false.
95
-     */
96
-    _onCancel() {
97
-        // An undefined password is understood to cancel the request to lock the
98
-        // conference/room.
99
-        return this._onSubmit(undefined);
100
-    }
101
-
102
-    _onSubmit: (?string) => boolean;
103
-
104
-    /**
105
-     * Notifies this prompt that it has been dismissed by submitting a specific
106
-     * value.
107
-     *
108
-     * @param {string|undefined} value - The submitted value.
109
-     * @private
110
-     * @returns {boolean} False because we do not want to hide this
111
-     * dialog/prompt as the hiding will be handled inside endRoomLockRequest
112
-     * after setting the password is resolved.
113
-     */
114
-    _onSubmit(value: ?string) {
115
-        this.props.dispatch(endRoomLockRequest(this.props.conference, value));
116
-
117
-        return false; // Do not hide.
118
-    }
119
-
120
-    _validateInput: (string) => boolean;
121
-
122
-    /**
123
-     * Verifies input in case only digits are required.
124
-     *
125
-     * @param {string|undefined} value - The submitted value.
126
-     * @private
127
-     * @returns {boolean} False when the value is not valid and True otherwise.
128
-     */
129
-    _validateInput(value: string) {
130
-
131
-        // we want only digits, but both number-pad and numeric add ',' and '.' as symbols
132
-        if (this.props.passwordNumberOfDigits && value.length > 0 && !/^\d+$/.test(value)) {
133
-            return false;
134
-        }
135
-
136
-        return true;
137
-    }
138
-}
139
-
140
-export default connect()(RoomLockPrompt);

+ 0
- 0
react/features/room-lock/components/RoomLockPrompt.web.js Voir le fichier


+ 83
- 0
react/features/room-lock/components/RoomLockSwitch.js Voir le fichier

@@ -0,0 +1,83 @@
1
+// @flow
2
+
3
+import React from 'react';
4
+import { Switch, Text, View } from 'react-native';
5
+
6
+import { translate } from '../../base/i18n';
7
+import { connect } from '../../base/redux';
8
+import { LOCKED_REMOTELY } from '../constants';
9
+
10
+import styles, {
11
+    DISABLED_THUMB_COLOR,
12
+    ENABLED_THUMB_COLOR, ENABLED_TRACK_COLOR
13
+} from './styles';
14
+
15
+/**
16
+ * The type of the React {@code Component} props of {@link RoomLockSwitch}.
17
+ */
18
+type Props = {
19
+
20
+    /**
21
+     * Checks if the room is locked based on defined room lock constants.
22
+     */
23
+    locked: string,
24
+
25
+    /**
26
+     * Whether the switch is disabled.
27
+     */
28
+    disabled: boolean,
29
+
30
+    /**
31
+     * Callback to be invoked when the user toggles room lock.
32
+     */
33
+    onToggleRoomLock: Function,
34
+
35
+    /**
36
+     * Control for room lock.
37
+     */
38
+    toggleRoomLock: boolean,
39
+
40
+    /**
41
+     * Invoked to obtain translated strings.
42
+     */
43
+    t: Function
44
+};
45
+
46
+/**
47
+ * Component meant to Add/Remove meeting password.
48
+ *
49
+ * @returns {React$Element<any>}
50
+ */
51
+function RoomLockSwitch(
52
+        {
53
+            locked,
54
+            disabled,
55
+            onToggleRoomLock,
56
+            toggleRoomLock,
57
+            t
58
+        }: Props) {
59
+
60
+    return (
61
+        <View style = { styles.roomLockSwitchContainer }>
62
+            <Text>
63
+                {
64
+                    locked === LOCKED_REMOTELY
65
+                        && t('passwordSetRemotely')
66
+                }
67
+            </Text>
68
+            <Switch
69
+                disabled = { disabled }
70
+                onValueChange = { onToggleRoomLock }
71
+                thumbColor = {
72
+                    toggleRoomLock
73
+                        ? ENABLED_THUMB_COLOR
74
+                        : DISABLED_THUMB_COLOR
75
+                }
76
+                trackColor = {{ true: ENABLED_TRACK_COLOR }}
77
+                value = { toggleRoomLock } />
78
+        </View>
79
+    );
80
+}
81
+
82
+
83
+export default translate(connect()(RoomLockSwitch));

+ 0
- 2
react/features/room-lock/components/index.js Voir le fichier

@@ -1,3 +1 @@
1 1
 export { default as PasswordRequiredPrompt } from './PasswordRequiredPrompt';
2
-export { default as RoomLockButton } from './RoomLockButton';
3
-export { default as RoomLockPrompt } from './RoomLockPrompt';

+ 16
- 0
react/features/room-lock/components/styles.js Voir le fichier

@@ -0,0 +1,16 @@
1
+// @flow
2
+
3
+import { ColorPalette } from '../../base/styles';
4
+
5
+export const ENABLED_THUMB_COLOR = ColorPalette.blueHighlight;
6
+export const ENABLED_TRACK_COLOR = ColorPalette.blue;
7
+export const DISABLED_THUMB_COLOR = ColorPalette.darkGrey;
8
+
9
+export default {
10
+    roomLockSwitchContainer: {
11
+        alignItems: 'center',
12
+        flexDirection: 'row',
13
+        justifyContent: 'space-between',
14
+        marginTop: 16
15
+    }
16
+};

+ 1
- 3
react/features/room-lock/middleware.js Voir le fichier

@@ -16,7 +16,7 @@ import {
16 16
 } from '../notifications';
17 17
 
18 18
 import { _openPasswordRequiredPrompt } from './actions';
19
-import { PasswordRequiredPrompt, RoomLockPrompt } from './components';
19
+import { PasswordRequiredPrompt } from './components';
20 20
 import { LOCKED_REMOTELY } from './constants';
21 21
 import logger from './logger';
22 22
 
@@ -85,7 +85,6 @@ MiddlewareRegistry.register(store => next => action => {
85 85
  */
86 86
 function _conferenceJoined({ dispatch }, next, action) {
87 87
     dispatch(hideDialog(PasswordRequiredPrompt));
88
-    dispatch(hideDialog(RoomLockPrompt));
89 88
 
90 89
     return next(action);
91 90
 }
@@ -116,7 +115,6 @@ function _conferenceFailed({ dispatch }, next, action) {
116 115
         }
117 116
     } else {
118 117
         dispatch(hideDialog(PasswordRequiredPrompt));
119
-        dispatch(hideDialog(RoomLockPrompt));
120 118
     }
121 119
 
122 120
     return next(action);

+ 6
- 15
react/features/security/components/security-dialog/SecurityDialogButton.js Voir le fichier

@@ -1,5 +1,7 @@
1 1
 // @flow
2 2
 
3
+import type { Dispatch } from 'redux';
4
+
3 5
 import { createToolbarEvent, sendAnalytics } from '../../../analytics';
4 6
 import { translate } from '../../../base/i18n';
5 7
 import { IconSecurityOff, IconSecurityOn } from '../../../base/icons';
@@ -16,10 +18,9 @@ type Props = AbstractButtonProps & {
16 18
     _locked: boolean,
17 19
 
18 20
     /**
19
-     * On click handler that opens the security dialog.
21
+     * The redux {@code dispatch} function.
20 22
      */
21
-    onClick: Function
22
-
23
+    dispatch: Dispatch<any>
23 24
 };
24 25
 
25 26
 
@@ -40,7 +41,7 @@ class SecurityDialogButton extends AbstractButton<Props, *> {
40 41
      */
41 42
     _handleClick() {
42 43
         sendAnalytics(createToolbarEvent('toggle.security', { enable: !this.props._locked }));
43
-        this.props.onClick();
44
+        this.props.dispatch(toggleSecurityDialog());
44 45
     }
45 46
 
46 47
     /**
@@ -69,14 +70,4 @@ function mapStateToProps(state: Object) {
69 70
     };
70 71
 }
71 72
 
72
-/**
73
- * Maps dispatching of some action to React component props.
74
- *
75
- * @param {Function} dispatch - Redux action dispatcher.
76
- * @returns {Props}
77
- */
78
-const mapDispatchToProps = {
79
-    onClick: () => toggleSecurityDialog()
80
-};
81
-
82
-export default translate(connect(mapStateToProps, mapDispatchToProps)(SecurityDialogButton));
73
+export default translate(connect(mapStateToProps)(SecurityDialogButton));

+ 1
- 0
react/features/security/components/security-dialog/_.native.js Voir le fichier

@@ -0,0 +1 @@
1
+export * from './native';

+ 1
- 0
react/features/security/components/security-dialog/_.web.js Voir le fichier

@@ -0,0 +1 @@
1
+export * from './web';

+ 1
- 4
react/features/security/components/security-dialog/index.js Voir le fichier

@@ -1,4 +1 @@
1
-// @flow
2
-
3
-export { default as SecurityDialog } from './SecurityDialog';
4
-export { default as SecurityDialogButton } from './SecurityDialogButton';
1
+export * from './_';

+ 444
- 0
react/features/security/components/security-dialog/native/SecurityDialog.js Voir le fichier

@@ -0,0 +1,444 @@
1
+// @flow
2
+
3
+import React, { PureComponent } from 'react';
4
+import {
5
+    KeyboardAvoidingView,
6
+    Platform,
7
+    Text,
8
+    TextInput,
9
+    View
10
+} from 'react-native';
11
+import { connect } from 'react-redux';
12
+import type { Dispatch } from 'redux';
13
+
14
+import { ColorSchemeRegistry } from '../../../../base/color-scheme';
15
+import {
16
+    FIELD_UNDERLINE,
17
+    CustomSubmitDialog
18
+} from '../../../../base/dialog';
19
+import { getFeatureFlag, MEETING_PASSWORD_ENABLED } from '../../../../base/flags';
20
+import { translate } from '../../../../base/i18n';
21
+import { isLocalParticipantModerator } from '../../../../base/participants';
22
+import { StyleType } from '../../../../base/styles';
23
+import { toggleLobbyMode } from '../../../../lobby/actions.any';
24
+import LobbyModeSwitch
25
+    from '../../../../lobby/components/native/LobbyModeSwitch';
26
+import { LOCKED_LOCALLY } from '../../../../room-lock';
27
+import {
28
+    endRoomLockRequest,
29
+    unlockRoom
30
+} from '../../../../room-lock/actions';
31
+import RoomLockSwitch from '../../../../room-lock/components/RoomLockSwitch';
32
+
33
+/**
34
+ * The style of the {@link TextInput} rendered by {@code SecurityDialog}. As it
35
+ * requests the entry of a password, {@code TextInput} automatically correcting
36
+ * the entry of the password is a pain to deal with as a user.
37
+ */
38
+const _TEXT_INPUT_PROPS = {
39
+    autoCapitalize: 'none',
40
+    autoCorrect: false
41
+};
42
+
43
+/**
44
+ * The type of the React {@code Component} props of {@link SecurityDialog}.
45
+ */
46
+type Props = {
47
+
48
+    /**
49
+     * The JitsiConference which requires a password.
50
+     */
51
+    _conference: Object,
52
+
53
+    /**
54
+     * The color-schemed stylesheet of the feature.
55
+     */
56
+    _dialogStyles: StyleType,
57
+
58
+    /**
59
+     * Whether the local user is the moderator.
60
+     */
61
+    _isModerator: boolean,
62
+
63
+    /**
64
+     * State of the lobby mode.
65
+     */
66
+    _lobbyEnabled: boolean,
67
+
68
+    /**
69
+     * Whether the lobby mode switch is available or not.
70
+     */
71
+    _lobbyModeSwitchVisible: boolean,
72
+
73
+    /**
74
+     * The value for how the conference is locked (or undefined if not locked)
75
+     * as defined by room-lock constants.
76
+     */
77
+    _locked: string,
78
+
79
+    /**
80
+     * Checks if the conference room is locked or not.
81
+     */
82
+    _lockedConference: boolean,
83
+
84
+    /**
85
+     * The current known password for the JitsiConference.
86
+     */
87
+    _password: string,
88
+
89
+    /**
90
+     * Number of digits used in the room-lock password.
91
+     */
92
+    _passwordNumberOfDigits: number,
93
+
94
+    /**
95
+     * Whether the room lock switch is available or not.
96
+     */
97
+    _roomLockSwitchVisible: boolean,
98
+
99
+    /**
100
+     * The color-schemed stylesheet of the security dialog feature.
101
+     */
102
+    _securityDialogStyles: StyleType,
103
+
104
+    /**
105
+     * Redux store dispatch function.
106
+     */
107
+    dispatch: Dispatch<any>,
108
+
109
+    /**
110
+     * Invoked to obtain translated strings.
111
+     */
112
+    t: Function
113
+};
114
+
115
+/**
116
+ * The type of the React {@code Component} state of {@link SecurityDialog}.
117
+ */
118
+type State = {
119
+
120
+    /**
121
+     * Password added by the participant for room lock.
122
+     */
123
+    passwordInputValue: string,
124
+
125
+    /**
126
+     * Shows an input or a message.
127
+     */
128
+    showElement: boolean
129
+};
130
+
131
+/**
132
+ * Component that renders the security options dialog.
133
+ *
134
+ * @returns {React$Element<any>}
135
+ */
136
+class SecurityDialog extends PureComponent<Props, State> {
137
+
138
+    /**
139
+     * Instantiates a new {@code SecurityDialog}.
140
+     *
141
+     * @inheritdoc
142
+     */
143
+    constructor(props: Props) {
144
+        super(props);
145
+
146
+        this.state = {
147
+            passwordInputValue: '',
148
+            showElement: props._locked === LOCKED_LOCALLY || false
149
+        };
150
+
151
+        this._onChangeText = this._onChangeText.bind(this);
152
+        this._onSubmit = this._onSubmit.bind(this);
153
+        this._onToggleLobbyMode = this._onToggleLobbyMode.bind(this);
154
+        this._onToggleRoomLock = this._onToggleRoomLock.bind(this);
155
+    }
156
+
157
+    /**
158
+     * Implements {@code SecurityDialog.render}.
159
+     *
160
+     * @inheritdoc
161
+     */
162
+    render() {
163
+        return (
164
+            <CustomSubmitDialog
165
+                onSubmit = { this._onSubmit }>
166
+                <KeyboardAvoidingView
167
+                    behavior =
168
+                        {
169
+                            Platform.OS === 'ios'
170
+                                ? 'padding' : 'height'
171
+                        }
172
+                    enabled = { true }>
173
+                    { this._renderLobbyMode() }
174
+                    { this._renderRoomLock() }
175
+                </KeyboardAvoidingView>
176
+            </CustomSubmitDialog>
177
+        );
178
+    }
179
+
180
+    /**
181
+     * Renders lobby mode.
182
+     *
183
+     * @returns {ReactElement}
184
+     * @private
185
+     */
186
+    _renderLobbyMode() {
187
+        const {
188
+            _lobbyEnabled,
189
+            _lobbyModeSwitchVisible,
190
+            _securityDialogStyles,
191
+            t
192
+        } = this.props;
193
+
194
+        if (!_lobbyModeSwitchVisible) {
195
+            return null;
196
+        }
197
+
198
+        return (
199
+            <View>
200
+                <Text style = { _securityDialogStyles.title } >
201
+                    { t('lobby.dialogTitle') }
202
+                </Text>
203
+                <Text style = { _securityDialogStyles.text } >
204
+                    { t('lobby.enableDialogText') }
205
+                </Text>
206
+                <LobbyModeSwitch
207
+                    lobbyEnabled = { _lobbyEnabled }
208
+                    onToggleLobbyMode = { this._onToggleLobbyMode } />
209
+            </View>
210
+        );
211
+    }
212
+
213
+    /**
214
+     * Renders room lock.
215
+     *
216
+     * @returns {ReactElement}
217
+     * @private
218
+     */
219
+    _renderRoomLock() {
220
+        const {
221
+            _isModerator,
222
+            _locked,
223
+            _lockedConference,
224
+            _roomLockSwitchVisible,
225
+            _securityDialogStyles,
226
+            t
227
+        } = this.props;
228
+        const { showElement } = this.state;
229
+
230
+        if (!_roomLockSwitchVisible) {
231
+            return null;
232
+        }
233
+
234
+        return (
235
+            <View>
236
+                <Text style = { _securityDialogStyles.title } >
237
+                    { t('dialog.lockRoom') }
238
+                </Text>
239
+                <Text style = { _securityDialogStyles.text } >
240
+                    { t('security.about') }
241
+                </Text>
242
+                <RoomLockSwitch
243
+                    disabled = { !_isModerator }
244
+                    locked = { _locked }
245
+                    onToggleRoomLock = { this._onToggleRoomLock }
246
+                    toggleRoomLock = { showElement || _lockedConference } />
247
+                { this._renderRoomLockMessage() }
248
+            </View>
249
+        );
250
+    }
251
+
252
+    /**
253
+     * Renders room lock text input/message.
254
+     *
255
+     * @returns {ReactElement}
256
+     * @private
257
+     */
258
+    _renderRoomLockMessage() {
259
+        let textInputProps = _TEXT_INPUT_PROPS;
260
+        const {
261
+            _isModerator,
262
+            _locked,
263
+            _password,
264
+            _passwordNumberOfDigits,
265
+            _securityDialogStyles,
266
+            t
267
+        } = this.props;
268
+        const { passwordInputValue, showElement } = this.state;
269
+
270
+        if (_passwordNumberOfDigits) {
271
+            textInputProps = {
272
+                ...textInputProps,
273
+                keyboardType: 'numeric',
274
+                maxLength: _passwordNumberOfDigits
275
+            };
276
+        }
277
+
278
+        if (!_isModerator) {
279
+            return null;
280
+        }
281
+
282
+        if (showElement) {
283
+            if (typeof _locked === 'undefined') {
284
+                return (
285
+                    <TextInput
286
+                        onChangeText = { this._onChangeText }
287
+                        placeholder = { t('lobby.passwordField') }
288
+                        style = { _securityDialogStyles.field }
289
+                        underlineColorAndroid = { FIELD_UNDERLINE }
290
+                        value = { passwordInputValue }
291
+                        { ...textInputProps } />
292
+                );
293
+            } else if (_locked) {
294
+                if (_locked === LOCKED_LOCALLY && typeof _password !== 'undefined') {
295
+                    return (
296
+                        <TextInput
297
+                            onChangeText = { this._onChangeText }
298
+                            placeholder = { _password }
299
+                            style = { _securityDialogStyles.field }
300
+                            underlineColorAndroid = { FIELD_UNDERLINE }
301
+                            value = { passwordInputValue }
302
+                            { ...textInputProps } />
303
+                    );
304
+                }
305
+            }
306
+        }
307
+    }
308
+
309
+    _onToggleLobbyMode: () => void;
310
+
311
+    /**
312
+     * Handles the enable-disable lobby mode switch.
313
+     *
314
+     * @private
315
+     * @returns {void}
316
+     */
317
+    _onToggleLobbyMode() {
318
+        const { _lobbyEnabled, dispatch } = this.props;
319
+
320
+        if (_lobbyEnabled) {
321
+            dispatch(toggleLobbyMode(false));
322
+        } else {
323
+            dispatch(toggleLobbyMode(true));
324
+        }
325
+    }
326
+
327
+    _onToggleRoomLock: () => void;
328
+
329
+    /**
330
+     * Callback to be invoked when room lock button is pressed.
331
+     *
332
+     * @returns {void}
333
+     */
334
+    _onToggleRoomLock() {
335
+        const { _isModerator, _locked, dispatch } = this.props;
336
+        const { showElement } = this.state;
337
+
338
+        this.setState({
339
+            showElement: !showElement
340
+        });
341
+
342
+        if (_locked && _isModerator) {
343
+            dispatch(unlockRoom());
344
+
345
+            this.setState({
346
+                showElement: false
347
+            });
348
+        }
349
+    }
350
+
351
+    /**
352
+     * Verifies input in case only digits are required.
353
+     *
354
+     * @param {string} passwordInputValue - The value of the password
355
+     * text input.
356
+     * @private
357
+     * @returns {boolean} False when the value is not valid and True otherwise.
358
+     */
359
+    _validateInputValue(passwordInputValue: string) {
360
+        const { _passwordNumberOfDigits } = this.props;
361
+
362
+        // we want only digits,
363
+        // but both number-pad and numeric add ',' and '.' as symbols
364
+        if (_passwordNumberOfDigits
365
+            && passwordInputValue.length > 0
366
+            && !/^\d+$/.test(passwordInputValue)) {
367
+            return false;
368
+        }
369
+
370
+        return true;
371
+    }
372
+
373
+    _onChangeText: string => void;
374
+
375
+    /**
376
+     * Callback to be invoked when the text in the field changes.
377
+     *
378
+     * @param {string} passwordInputValue - The value of password input.
379
+     * @returns {void}
380
+     */
381
+    _onChangeText(passwordInputValue) {
382
+        if (!this._validateInputValue(passwordInputValue)) {
383
+            return;
384
+        }
385
+
386
+        this.setState({
387
+            passwordInputValue
388
+        });
389
+    }
390
+
391
+    _onSubmit: () => boolean;
392
+
393
+    /**
394
+     * Submits value typed in text input.
395
+     *
396
+     * @returns {boolean} False because we do not want to hide this
397
+     * dialog/prompt as the hiding will be handled inside endRoomLockRequest
398
+     * after setting the password is resolved.
399
+     */
400
+    _onSubmit() {
401
+        const {
402
+            _conference,
403
+            dispatch
404
+        } = this.props;
405
+        const { passwordInputValue } = this.state;
406
+
407
+        dispatch(endRoomLockRequest(_conference, passwordInputValue));
408
+
409
+        return false;
410
+    }
411
+}
412
+
413
+/**
414
+ * Maps part of the Redux state to the props of this component.
415
+ *
416
+ * @param {Object} state - The Redux state.
417
+ * @returns {Props}
418
+ */
419
+function _mapStateToProps(state: Object): Object {
420
+    const { conference, locked, password } = state['features/base/conference'];
421
+    const { hideLobbyButton } = state['features/base/config'];
422
+    const { lobbyEnabled } = state['features/lobby'];
423
+    const { roomPasswordNumberOfDigits } = state['features/base/config'];
424
+    const lobbySupported = conference && conference.isLobbySupported();
425
+    const visible = getFeatureFlag(state, MEETING_PASSWORD_ENABLED, true);
426
+
427
+    return {
428
+        _conference: conference,
429
+        _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog'),
430
+        _isModerator: isLocalParticipantModerator(state),
431
+        _lobbyEnabled: lobbyEnabled,
432
+        _lobbyModeSwitchVisible:
433
+            lobbySupported && isLocalParticipantModerator(state) && !hideLobbyButton,
434
+        _locked: locked,
435
+        _lockedConference: Boolean(conference && locked),
436
+        _password: password,
437
+        _passwordNumberOfDigits: roomPasswordNumberOfDigits,
438
+        _roomLockSwitchVisible: visible,
439
+        _securityDialogStyles: ColorSchemeRegistry.get(state, 'SecurityDialog')
440
+    };
441
+}
442
+
443
+
444
+export default translate(connect(_mapStateToProps)(SecurityDialog));

+ 4
- 0
react/features/security/components/security-dialog/native/index.js Voir le fichier

@@ -0,0 +1,4 @@
1
+// @flow
2
+
3
+export { default as SecurityDialog } from './SecurityDialog';
4
+

react/features/security/components/security-dialog/PasswordForm.js → react/features/security/components/security-dialog/web/PasswordForm.js Voir le fichier

@@ -2,8 +2,8 @@
2 2
 
3 3
 import React, { Component } from 'react';
4 4
 
5
-import { translate } from '../../../base/i18n';
6
-import { LOCKED_LOCALLY } from '../../../room-lock';
5
+import { translate } from '../../../../base/i18n';
6
+import { LOCKED_LOCALLY } from '../../../../room-lock';
7 7
 
8 8
 /**
9 9
  * The type of the React {@code Component} props of {@link PasswordForm}.

react/features/security/components/security-dialog/PasswordSection.js → react/features/security/components/security-dialog/web/PasswordSection.js Voir le fichier

@@ -3,8 +3,8 @@
3 3
 
4 4
 import React, { useRef } from 'react';
5 5
 
6
-import { translate } from '../../../base/i18n';
7
-import { copyText } from '../../../base/util';
6
+import { translate } from '../../../../base/i18n';
7
+import { copyText } from '../../../../base/util';
8 8
 
9 9
 import PasswordForm from './PasswordForm';
10 10
 

react/features/security/components/security-dialog/SecurityDialog.js → react/features/security/components/security-dialog/web/SecurityDialog.js Voir le fichier

@@ -2,13 +2,13 @@
2 2
 
3 3
 import React, { useState, useEffect } from 'react';
4 4
 
5
-import { setPassword as setPass } from '../../../base/conference';
6
-import { Dialog } from '../../../base/dialog';
7
-import { translate } from '../../../base/i18n';
8
-import { isLocalParticipantModerator } from '../../../base/participants';
9
-import { connect } from '../../../base/redux';
10
-import { E2EESection } from '../../../e2ee/components';
11
-import { LobbySection } from '../../../lobby';
5
+import { setPassword as setPass } from '../../../../base/conference';
6
+import { Dialog } from '../../../../base/dialog';
7
+import { translate } from '../../../../base/i18n';
8
+import { isLocalParticipantModerator } from '../../../../base/participants';
9
+import { connect } from '../../../../base/redux';
10
+import { E2EESection } from '../../../../e2ee/components';
11
+import { LobbySection } from '../../../../lobby';
12 12
 
13 13
 import PasswordSection from './PasswordSection';
14 14
 

+ 3
- 0
react/features/security/components/security-dialog/web/index.js Voir le fichier

@@ -0,0 +1,3 @@
1
+// @flow
2
+
3
+export { default as SecurityDialog } from './SecurityDialog';

+ 2
- 4
react/features/toolbox/components/native/OverflowMenu.js Voir le fichier

@@ -11,10 +11,9 @@ import { connect } from '../../../base/redux';
11 11
 import { StyleType } from '../../../base/styles';
12 12
 import { SharedDocumentButton } from '../../../etherpad';
13 13
 import { InviteButton } from '../../../invite';
14
-import { LobbyModeButton } from '../../../lobby/components/native';
15 14
 import { AudioRouteButton } from '../../../mobile/audio-mode';
16 15
 import { LiveStreamButton, RecordButton } from '../../../recording';
17
-import { RoomLockButton } from '../../../room-lock';
16
+import SecurityDialogButton from '../../../security/components/security-dialog/SecurityDialogButton';
18 17
 import { SharedVideoButton } from '../../../shared-video/components';
19 18
 import { ClosedCaptionButton } from '../../../subtitles';
20 19
 import { TileViewButton } from '../../../video-layout';
@@ -140,7 +139,7 @@ class OverflowMenu extends PureComponent<Props, State> {
140 139
                 {!toolbarButtons.has('invite') && <InviteButton { ...buttonProps } />}
141 140
                 <AudioOnlyButton { ...buttonProps } />
142 141
                 {!toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
143
-                <LobbyModeButton { ...buttonProps } />
142
+                <SecurityDialogButton { ...buttonProps } />
144 143
                 <ScreenSharingButton { ...buttonProps } />
145 144
                 <MoreOptionsButton { ...moreOptionsButtonProps } />
146 145
                 <Collapsible collapsed = { !showMore }>
@@ -149,7 +148,6 @@ class OverflowMenu extends PureComponent<Props, State> {
149 148
                     <RecordButton { ...buttonProps } />
150 149
                     <LiveStreamButton { ...buttonProps } />
151 150
                     <SharedVideoButton { ...buttonProps } />
152
-                    <RoomLockButton { ...buttonProps } />
153 151
                     <ClosedCaptionButton { ...buttonProps } />
154 152
                     <SharedDocumentButton { ...buttonProps } />
155 153
                     <MuteEveryoneButton { ...buttonProps } />

+ 1
- 1
react/features/toolbox/components/web/Toolbox.js Voir le fichier

@@ -47,7 +47,7 @@ import {
47 47
     LiveStreamButton,
48 48
     RecordButton
49 49
 } from '../../../recording';
50
-import { SecurityDialogButton } from '../../../security';
50
+import SecurityDialogButton from '../../../security/components/security-dialog/SecurityDialogButton';
51 51
 import {
52 52
     SETTINGS_TABS,
53 53
     SettingsButton,

Chargement…
Annuler
Enregistrer