feat(config): Add config option for e2ee label
This commit is contained in:
parent
909c397664
commit
f5dee99131
|
@ -859,6 +859,7 @@ var config = {
|
||||||
disableRemoteControl
|
disableRemoteControl
|
||||||
displayJids
|
displayJids
|
||||||
externalConnectUrl
|
externalConnectUrl
|
||||||
|
e2eeLabel
|
||||||
firefox_fake_device
|
firefox_fake_device
|
||||||
googleApiApplicationClientID
|
googleApiApplicationClientID
|
||||||
iAmRecorder
|
iAmRecorder
|
||||||
|
|
|
@ -210,8 +210,11 @@
|
||||||
"displayNameRequired": "Hi! What’s your name?",
|
"displayNameRequired": "Hi! What’s your name?",
|
||||||
"done": "Done",
|
"done": "Done",
|
||||||
"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.",
|
"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.",
|
||||||
|
"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.",
|
||||||
"e2eeLabel": "Enable End-to-End Encryption",
|
"e2eeLabel": "Enable End-to-End Encryption",
|
||||||
|
"e2eeLabelCustom": "Enable {{label}}",
|
||||||
"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.",
|
"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.",
|
||||||
|
"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.",
|
||||||
"enterDisplayName": "Enter your name here",
|
"enterDisplayName": "Enter your name here",
|
||||||
"embedMeeting": "Embed meeting",
|
"embedMeeting": "Embed meeting",
|
||||||
"error": "Error",
|
"error": "Error",
|
||||||
|
|
|
@ -109,6 +109,7 @@ export default [
|
||||||
'doNotStoreRoom',
|
'doNotStoreRoom',
|
||||||
'doNotFlipLocalVideo',
|
'doNotFlipLocalVideo',
|
||||||
'dropbox',
|
'dropbox',
|
||||||
|
'e2eeLabel',
|
||||||
'e2eping',
|
'e2eping',
|
||||||
'enableDisplayNameInStats',
|
'enableDisplayNameInStats',
|
||||||
'enableEmailInStats',
|
'enableEmailInStats',
|
||||||
|
|
|
@ -12,6 +12,11 @@ import { doesEveryoneSupportE2EE } from '../functions';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom e2ee label.
|
||||||
|
*/
|
||||||
|
_e2eeLabel: string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether E2EE is currently enabled or not.
|
* Whether E2EE is currently enabled or not.
|
||||||
*/
|
*/
|
||||||
|
@ -87,9 +92,21 @@ class E2EESection extends Component<Props, State> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { _everyoneSupportE2EE, t } = this.props;
|
const { _e2eeLabel, _everyoneSupportE2EE, t } = this.props;
|
||||||
const { enabled } = this.state;
|
const { enabled } = this.state;
|
||||||
const description = t('dialog.e2eeDescription');
|
let description;
|
||||||
|
let label;
|
||||||
|
let warning;
|
||||||
|
|
||||||
|
if (_e2eeLabel) {
|
||||||
|
description = t('dialog.e2eeDescriptionCustom', { label: _e2eeLabel });
|
||||||
|
label = t('dialog.e2eeLabelCustom', { label: _e2eeLabel });
|
||||||
|
warning = t('dialog.e2eeWarningCustom', { label: _e2eeLabel });
|
||||||
|
} else {
|
||||||
|
description = t('dialog.e2eeDescription');
|
||||||
|
label = t('dialog.e2eeLabel');
|
||||||
|
warning = t('dialog.e2eeWarning');
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id = 'e2ee-section'>
|
<div id = 'e2ee-section'>
|
||||||
|
@ -99,11 +116,11 @@ class E2EESection extends Component<Props, State> {
|
||||||
id = 'e2ee-section-description'>
|
id = 'e2ee-section-description'>
|
||||||
{ description }
|
{ description }
|
||||||
{ !_everyoneSupportE2EE && <br /> }
|
{ !_everyoneSupportE2EE && <br /> }
|
||||||
{ !_everyoneSupportE2EE && t('dialog.e2eeWarning') }
|
{ !_everyoneSupportE2EE && warning }
|
||||||
</p>
|
</p>
|
||||||
<div className = 'control-row'>
|
<div className = 'control-row'>
|
||||||
<label htmlFor = 'e2ee-section-switch'>
|
<label htmlFor = 'e2ee-section-switch'>
|
||||||
{ t('dialog.e2eeLabel') }
|
{ label }
|
||||||
</label>
|
</label>
|
||||||
<Switch
|
<Switch
|
||||||
id = 'e2ee-section-switch'
|
id = 'e2ee-section-switch'
|
||||||
|
@ -143,8 +160,10 @@ class E2EESection extends Component<Props, State> {
|
||||||
*/
|
*/
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
const { enabled } = state['features/e2ee'];
|
const { enabled } = state['features/e2ee'];
|
||||||
|
const { e2eeLabel } = state['features/base/config'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
_e2eeLabel: e2eeLabel,
|
||||||
_enabled: enabled,
|
_enabled: enabled,
|
||||||
_everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
|
_everyoneSupportE2EE: doesEveryoneSupportE2EE(state)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue