|
@@ -13,9 +13,9 @@ import { doesEveryoneSupportE2EE } from '../functions';
|
13
|
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
|
21
|
* Whether E2EE is currently enabled or not.
|
|
@@ -92,21 +92,11 @@ class E2EESection extends Component<Props, State> {
|
92
|
92
|
* @returns {ReactElement}
|
93
|
93
|
*/
|
94
|
94
|
render() {
|
95
|
|
- const { _e2eeLabel, _everyoneSupportE2EE, t } = this.props;
|
|
95
|
+ const { _e2eeLabels, _everyoneSupportE2EE, t } = this.props;
|
96
|
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
|
101
|
return (
|
112
|
102
|
<div id = 'e2ee-section'>
|
|
@@ -160,10 +150,10 @@ class E2EESection extends Component<Props, State> {
|
160
|
150
|
*/
|
161
|
151
|
function mapStateToProps(state) {
|
162
|
152
|
const { enabled } = state['features/e2ee'];
|
163
|
|
- const { e2eeLabel } = state['features/base/config'];
|
|
153
|
+ const { e2eeLabels } = state['features/base/config'];
|
164
|
154
|
|
165
|
155
|
return {
|
166
|
|
- _e2eeLabel: e2eeLabel,
|
|
156
|
+ _e2eeLabels: e2eeLabels,
|
167
|
157
|
_enabled: enabled,
|
168
|
158
|
_everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
|
169
|
159
|
};
|