浏览代码

feat(config): Add config option for e2ee label

master
Vlad Piersec 4 年前
父节点
当前提交
f5dee99131
共有 4 个文件被更改,包括 28 次插入4 次删除
  1. 1
    0
      config.js
  2. 3
    0
      lang/main.json
  3. 1
    0
      react/features/base/config/configWhitelist.js
  4. 23
    4
      react/features/e2ee/components/E2EESection.js

+ 1
- 0
config.js 查看文件

859
      disableRemoteControl
859
      disableRemoteControl
860
      displayJids
860
      displayJids
861
      externalConnectUrl
861
      externalConnectUrl
862
+     e2eeLabel
862
      firefox_fake_device
863
      firefox_fake_device
863
      googleApiApplicationClientID
864
      googleApiApplicationClientID
864
      iAmRecorder
865
      iAmRecorder

+ 3
- 0
lang/main.json 查看文件

210
         "displayNameRequired": "Hi! What’s your name?",
210
         "displayNameRequired": "Hi! What’s your name?",
211
         "done": "Done",
211
         "done": "Done",
212
         "e2eeDescription": "End-to-End Encryption is currently EXPERIMENTAL. Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.",
212
         "e2eeDescription": "End-to-End Encryption is currently EXPERIMENTAL. Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.",
213
+        "e2eeDescriptionCustom": "{{label}} is currently EXPERIMENTAL. Please keep in mind that turning on {{label}} will effectively disable server-side provided services such as: phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.",
213
         "e2eeLabel": "Enable End-to-End Encryption",
214
         "e2eeLabel": "Enable End-to-End Encryption",
215
+        "e2eeLabelCustom": "Enable {{label}}",
214
         "e2eeWarning": "WARNING: Not all participants in this meeting seem to have support for End-to-End encryption. If you enable it they won't be able to see nor hear you.",
216
         "e2eeWarning": "WARNING: Not all participants in this meeting seem to have support for End-to-End encryption. If you enable it they won't be able to see nor hear you.",
217
+      "e2eeWarningCustom": "WARNING: Not all participants in this meeting seem to have support for {{label}}. If you enable it they won't be able to see nor hear you.",
215
         "enterDisplayName": "Enter your name here",
218
         "enterDisplayName": "Enter your name here",
216
         "embedMeeting": "Embed meeting",
219
         "embedMeeting": "Embed meeting",
217
         "error": "Error",
220
         "error": "Error",

+ 1
- 0
react/features/base/config/configWhitelist.js 查看文件

109
     'doNotStoreRoom',
109
     'doNotStoreRoom',
110
     'doNotFlipLocalVideo',
110
     'doNotFlipLocalVideo',
111
     'dropbox',
111
     'dropbox',
112
+    'e2eeLabel',
112
     'e2eping',
113
     'e2eping',
113
     'enableDisplayNameInStats',
114
     'enableDisplayNameInStats',
114
     'enableEmailInStats',
115
     'enableEmailInStats',

+ 23
- 4
react/features/e2ee/components/E2EESection.js 查看文件

12
 
12
 
13
 type Props = {
13
 type Props = {
14
 
14
 
15
+    /**
16
+     * Custom e2ee label.
17
+     */
18
+    _e2eeLabel: string,
19
+
15
     /**
20
     /**
16
      * Whether E2EE is currently enabled or not.
21
      * Whether E2EE is currently enabled or not.
17
      */
22
      */
87
      * @returns {ReactElement}
92
      * @returns {ReactElement}
88
      */
93
      */
89
     render() {
94
     render() {
90
-        const { _everyoneSupportE2EE, t } = this.props;
95
+        const { _e2eeLabel, _everyoneSupportE2EE, t } = this.props;
91
         const { enabled } = this.state;
96
         const { enabled } = this.state;
92
-        const description = t('dialog.e2eeDescription');
97
+        let description;
98
+        let label;
99
+        let warning;
100
+
101
+        if (_e2eeLabel) {
102
+            description = t('dialog.e2eeDescriptionCustom', { label: _e2eeLabel });
103
+            label = t('dialog.e2eeLabelCustom', { label: _e2eeLabel });
104
+            warning = t('dialog.e2eeWarningCustom', { label: _e2eeLabel });
105
+        } else {
106
+            description = t('dialog.e2eeDescription');
107
+            label = t('dialog.e2eeLabel');
108
+            warning = t('dialog.e2eeWarning');
109
+        }
93
 
110
 
94
         return (
111
         return (
95
             <div id = 'e2ee-section'>
112
             <div id = 'e2ee-section'>
99
                     id = 'e2ee-section-description'>
116
                     id = 'e2ee-section-description'>
100
                     { description }
117
                     { description }
101
                     { !_everyoneSupportE2EE && <br /> }
118
                     { !_everyoneSupportE2EE && <br /> }
102
-                    { !_everyoneSupportE2EE && t('dialog.e2eeWarning') }
119
+                    { !_everyoneSupportE2EE && warning }
103
                 </p>
120
                 </p>
104
                 <div className = 'control-row'>
121
                 <div className = 'control-row'>
105
                     <label htmlFor = 'e2ee-section-switch'>
122
                     <label htmlFor = 'e2ee-section-switch'>
106
-                        { t('dialog.e2eeLabel') }
123
+                        { label }
107
                     </label>
124
                     </label>
108
                     <Switch
125
                     <Switch
109
                         id = 'e2ee-section-switch'
126
                         id = 'e2ee-section-switch'
143
  */
160
  */
144
 function mapStateToProps(state) {
161
 function mapStateToProps(state) {
145
     const { enabled } = state['features/e2ee'];
162
     const { enabled } = state['features/e2ee'];
163
+    const { e2eeLabel } = state['features/base/config'];
146
 
164
 
147
     return {
165
     return {
166
+        _e2eeLabel: e2eeLabel,
148
         _enabled: enabled,
167
         _enabled: enabled,
149
         _everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
168
         _everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
150
     };
169
     };

正在加载...
取消
保存