Browse Source

fix(config): Add separate entries for the e2ee labels

master
Vlad Piersec 4 years ago
parent
commit
d96246dea8

+ 1
- 1
config.js View File

868
      disableRemoteControl
868
      disableRemoteControl
869
      displayJids
869
      displayJids
870
      externalConnectUrl
870
      externalConnectUrl
871
-     e2eeLabel
871
+     e2eeLabels
872
      firefox_fake_device
872
      firefox_fake_device
873
      googleApiApplicationClientID
873
      googleApiApplicationClientID
874
      iAmRecorder
874
      iAmRecorder

+ 0
- 3
lang/main.json View File

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.",
214
         "e2eeLabel": "Enable End-to-End Encryption",
213
         "e2eeLabel": "Enable End-to-End Encryption",
215
-        "e2eeLabelCustom": "Enable {{label}}",
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.",
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.",
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.",
218
         "enterDisplayName": "Enter your name here",
215
         "enterDisplayName": "Enter your name here",
219
         "embedMeeting": "Embed meeting",
216
         "embedMeeting": "Embed meeting",
220
         "error": "Error",
217
         "error": "Error",

+ 1
- 1
react/features/base/config/configWhitelist.js View File

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

+ 6
- 0
react/features/e2ee/components/AbstractE2EELabel.js View File

3
 
3
 
4
 export type Props = {
4
 export type Props = {
5
 
5
 
6
+    /**
7
+     * Custom e2ee labels.
8
+     */
9
+    _e2eeLabels?: Object;
10
+
6
     /**
11
     /**
7
      * True if the label needs to be rendered, false otherwise.
12
      * True if the label needs to be rendered, false otherwise.
8
      */
13
      */
23
  */
28
  */
24
 export function _mapStateToProps(state: Object) {
29
 export function _mapStateToProps(state: Object) {
25
     return {
30
     return {
31
+        _e2eeLabels: state['features/base/config'].e2eeLabels,
26
         _showLabel: state['features/e2ee'].everyoneEnabledE2EE
32
         _showLabel: state['features/e2ee'].everyoneEnabledE2EE
27
     };
33
     };
28
 }
34
 }

+ 3
- 1
react/features/e2ee/components/E2EELabel.js View File

28
         if (!this.props._showLabel) {
28
         if (!this.props._showLabel) {
29
             return null;
29
             return null;
30
         }
30
         }
31
+        const { _e2eeLabels, t } = this.props;
32
+        const content = _e2eeLabels?.labelToolTip || t('e2ee.labelToolTip');
31
 
33
 
32
         return (
34
         return (
33
             <Tooltip
35
             <Tooltip
34
-                content = { this.props.t('e2ee.labelToolTip') }
36
+                content = { content }
35
                 position = { 'bottom' }>
37
                 position = { 'bottom' }>
36
                 <Label
38
                 <Label
37
                     className = 'label--green'
39
                     className = 'label--green'

+ 8
- 18
react/features/e2ee/components/E2EESection.js View File

13
 type Props = {
13
 type Props = {
14
 
14
 
15
     /**
15
     /**
16
-     * Custom e2ee label.
16
+     * Custom e2ee labels.
17
      */
17
      */
18
-    _e2eeLabel: string,
18
+    _e2eeLabels: Object,
19
 
19
 
20
     /**
20
     /**
21
      * Whether E2EE is currently enabled or not.
21
      * Whether E2EE is currently enabled or not.
92
      * @returns {ReactElement}
92
      * @returns {ReactElement}
93
      */
93
      */
94
     render() {
94
     render() {
95
-        const { _e2eeLabel, _everyoneSupportE2EE, t } = this.props;
95
+        const { _e2eeLabels, _everyoneSupportE2EE, t } = this.props;
96
         const { enabled } = this.state;
96
         const { enabled } = this.state;
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
-        }
97
+        const description = _e2eeLabels?.description || t('dialog.e2eeDescription');
98
+        const label = _e2eeLabels?.label || t('dialog.e2eeLabel');
99
+        const warning = _e2eeLabels?.warning || t('dialog.e2eeWarning');
110
 
100
 
111
         return (
101
         return (
112
             <div id = 'e2ee-section'>
102
             <div id = 'e2ee-section'>
160
  */
150
  */
161
 function mapStateToProps(state) {
151
 function mapStateToProps(state) {
162
     const { enabled } = state['features/e2ee'];
152
     const { enabled } = state['features/e2ee'];
163
-    const { e2eeLabel } = state['features/base/config'];
153
+    const { e2eeLabels } = state['features/base/config'];
164
 
154
 
165
     return {
155
     return {
166
-        _e2eeLabel: e2eeLabel,
156
+        _e2eeLabels: e2eeLabels,
167
         _enabled: enabled,
157
         _enabled: enabled,
168
         _everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
158
         _everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
169
     };
159
     };

Loading…
Cancel
Save