浏览代码

feat(prejoin): Add settings options for prejoin page

master
Vlad Piersec 5 年前
父节点
当前提交
b3ca51c7d0

+ 4
- 2
css/modals/settings/_settings.scss 查看文件

30
         width: 100%;
30
         width: 100%;
31
     }
31
     }
32
 
32
 
33
-    .profile-edit-field,
34
-    .settings-sub-pane {
33
+    .profile-edit-field {
35
         flex: 1;
34
         flex: 1;
36
     }
35
     }
36
+    .settings-sub-pane {
37
+        flex-grow: 1;
38
+    }
37
 
39
 
38
     .profile-edit-field {
40
     .profile-edit-field {
39
         margin-right: 20px;
41
         margin-right: 20px;

+ 4
- 2
lang/main.json 查看文件

501
         "audioAndVideoError": "Audio and video error:",
501
         "audioAndVideoError": "Audio and video error:",
502
         "audioOnlyError": "Audio error:",
502
         "audioOnlyError": "Audio error:",
503
         "audioTrackError": "Could not create audio track.",
503
         "audioTrackError": "Could not create audio track.",
504
+        "calling": "Calling",
504
         "callMe": "Call me",
505
         "callMe": "Call me",
505
         "callMeAtNumber": "Call me at this number:",
506
         "callMeAtNumber": "Call me at this number:",
506
         "configuringDevices": "Configuring devices...",
507
         "configuringDevices": "Configuring devices...",
524
         "linkCopied": "Link copied to clipboard",
525
         "linkCopied": "Link copied to clipboard",
525
         "lookGood": "It sounds like your microphone is working properly",
526
         "lookGood": "It sounds like your microphone is working properly",
526
         "or": "or",
527
         "or": "or",
527
-        "calling": "Calling",
528
+        "premeeting": "Pre meeting",
529
+        "showScreen": "Enable pre meeting screen",
528
         "startWithPhone": "Start with phone audio",
530
         "startWithPhone": "Start with phone audio",
529
         "screenSharingError": "Screen sharing error:",
531
         "screenSharingError": "Screen sharing error:",
530
         "videoOnlyError": "Video error:",
532
         "videoOnlyError": "Video error:",
869
         "header": "Help center"
871
         "header": "Help center"
870
     },
872
     },
871
     "lobby": {
873
     "lobby": {
872
-        "knockingParticipantList" : "Knocking participant list",
874
+        "knockingParticipantList": "Knocking participant list",
873
         "allow": "Allow",
875
         "allow": "Allow",
874
         "backToKnockModeButton": "No password, ask to join instead",
876
         "backToKnockModeButton": "No password, ask to join instead",
875
         "dialogTitle": "Lobby mode",
877
         "dialogTitle": "Lobby mode",

+ 15
- 0
react/features/settings/actions.js 查看文件

3
 import { setFollowMe, setStartMutedPolicy } from '../base/conference';
3
 import { setFollowMe, setStartMutedPolicy } from '../base/conference';
4
 import { openDialog } from '../base/dialog';
4
 import { openDialog } from '../base/dialog';
5
 import { i18next } from '../base/i18n';
5
 import { i18next } from '../base/i18n';
6
+import { updateSettings } from '../base/settings';
7
+import { setPrejoinPageVisibility } from '../prejoin';
6
 
8
 
7
 import {
9
 import {
8
     SET_AUDIO_SETTINGS_VISIBILITY,
10
     SET_AUDIO_SETTINGS_VISIBILITY,
64
             dispatch(setFollowMe(newState.followMeEnabled));
66
             dispatch(setFollowMe(newState.followMeEnabled));
65
         }
67
         }
66
 
68
 
69
+        const showPrejoinPage = newState.showPrejoinPage;
70
+
71
+        if (showPrejoinPage !== currentState.showPrejoinPage) {
72
+            // The 'showPrejoin' flag starts as 'true' on every new session.
73
+            // This prevents displaying the prejoin page when the user re-enables it.
74
+            if (showPrejoinPage && getState()['features/prejoin']?.showPrejoin) {
75
+                dispatch(setPrejoinPageVisibility(false));
76
+            }
77
+            dispatch(updateSettings({
78
+                userSelectedSkipPrejoin: !showPrejoinPage
79
+            }));
80
+        }
81
+
67
         if (newState.startAudioMuted !== currentState.startAudioMuted
82
         if (newState.startAudioMuted !== currentState.startAudioMuted
68
             || newState.startVideoMuted !== currentState.startVideoMuted) {
83
             || newState.startVideoMuted !== currentState.startVideoMuted) {
69
             dispatch(setStartMutedPolicy(
84
             dispatch(setStartMutedPolicy(

+ 44
- 1
react/features/settings/components/web/MoreTab.js 查看文件

48
      */
48
      */
49
     showModeratorSettings: boolean,
49
     showModeratorSettings: boolean,
50
 
50
 
51
+    /**
52
+     * Whether or not to display the prejoin settings section.
53
+     */
54
+    showPrejoinSettings: boolean,
55
+
56
+    /**
57
+     * Whether or not to show prejoin screen.
58
+     */
59
+    showPrejoinPage: boolean,
60
+
51
     /**
61
     /**
52
      * Whether or not the user has selected the Start Audio Muted feature to be
62
      * Whether or not the user has selected the Start Audio Muted feature to be
53
      * enabled.
63
      * enabled.
108
      * @returns {ReactElement}
118
      * @returns {ReactElement}
109
      */
119
      */
110
     render() {
120
     render() {
111
-        const { showModeratorSettings, showLanguageSettings } = this.props;
121
+        const { showModeratorSettings, showLanguageSettings, showPrejoinSettings } = this.props;
112
         const content = [];
122
         const content = [];
113
 
123
 
124
+        if (showPrejoinSettings) {
125
+            content.push(this._renderPrejoinScreenSettings());
126
+        }
127
+
114
         if (showModeratorSettings) {
128
         if (showModeratorSettings) {
115
             content.push(this._renderModeratorSettings());
129
             content.push(this._renderModeratorSettings());
116
         }
130
         }
239
             </div>
253
             </div>
240
         );
254
         );
241
     }
255
     }
256
+
257
+    /**
258
+     * Returns the React Element for modifying prejoin screen settings.
259
+     *
260
+     * @private
261
+     * @returns {ReactElement}
262
+     */
263
+    _renderPrejoinScreenSettings() {
264
+        const { t, showPrejoinPage } = this.props;
265
+
266
+        return (
267
+            <div
268
+                className = 'settings-sub-pane'
269
+                key = 'prejoin-screen'>
270
+                <div className = 'mock-atlaskit-label'>
271
+                    { t('prejoin.premeeting') }
272
+                </div>
273
+                <Checkbox
274
+                    isChecked = { showPrejoinPage }
275
+                    label = { t('prejoin.showScreen') }
276
+                    name = 'show-prejoin-page'
277
+                    // eslint-disable-next-line react/jsx-no-bind
278
+                    onChange = {
279
+                        ({ target: { checked } }) =>
280
+                            super._onChange({ showPrejoinPage: checked })
281
+                    } />
282
+            </div>
283
+        );
284
+    }
242
 }
285
 }
243
 
286
 
244
 export default translate(MoreTab);
287
 export default translate(MoreTab);

+ 3
- 2
react/features/settings/components/web/SettingsDialog.js 查看文件

131
     // The settings sections to display.
131
     // The settings sections to display.
132
     const showDeviceSettings = configuredTabs.includes('devices');
132
     const showDeviceSettings = configuredTabs.includes('devices');
133
     const moreTabProps = getMoreTabProps(state);
133
     const moreTabProps = getMoreTabProps(state);
134
-    const { showModeratorSettings, showLanguageSettings } = moreTabProps;
134
+    const { showModeratorSettings, showLanguageSettings, showPrejoinSettings } = moreTabProps;
135
     const showProfileSettings
135
     const showProfileSettings
136
         = configuredTabs.includes('profile') && jwt.isGuest;
136
         = configuredTabs.includes('profile') && jwt.isGuest;
137
     const showCalendarSettings
137
     const showCalendarSettings
184
         });
184
         });
185
     }
185
     }
186
 
186
 
187
-    if (showModeratorSettings || showLanguageSettings) {
187
+    if (showModeratorSettings || showLanguageSettings || showPrejoinSettings) {
188
         tabs.push({
188
         tabs.push({
189
             name: SETTINGS_TABS.MORE,
189
             name: SETTINGS_TABS.MORE,
190
             component: MoreTab,
190
             component: MoreTab,
197
                     ...newProps,
197
                     ...newProps,
198
                     currentLanguage: tabState.currentLanguage,
198
                     currentLanguage: tabState.currentLanguage,
199
                     followMeEnabled: tabState.followMeEnabled,
199
                     followMeEnabled: tabState.followMeEnabled,
200
+                    showPrejoinPage: tabState.showPrejoinPage,
200
                     startAudioMuted: tabState.startAudioMuted,
201
                     startAudioMuted: tabState.startAudioMuted,
201
                     startVideoMuted: tabState.startVideoMuted
202
                     startVideoMuted: tabState.startVideoMuted
202
                 };
203
                 };

+ 2
- 0
react/features/settings/functions.js 查看文件

118
         languages: LANGUAGES,
118
         languages: LANGUAGES,
119
         showLanguageSettings: configuredTabs.includes('language'),
119
         showLanguageSettings: configuredTabs.includes('language'),
120
         showModeratorSettings,
120
         showModeratorSettings,
121
+        showPrejoinSettings: state['features/base/config'].prejoinPageEnabled,
122
+        showPrejoinPage: !state['features/base/settings'].userSelectedSkipPrejoin,
121
         startAudioMuted: Boolean(conference && startAudioMutedPolicy),
123
         startAudioMuted: Boolean(conference && startAudioMutedPolicy),
122
         startVideoMuted: Boolean(conference && startVideoMutedPolicy)
124
         startVideoMuted: Boolean(conference && startVideoMutedPolicy)
123
     };
125
     };

正在加载...
取消
保存