Pārlūkot izejas kodu

ref: move e2ee field into security menu

master
Bettenbuk Zoltan 4 gadus atpakaļ
vecāks
revīzija
28e5edfb50

+ 35
- 0
css/_e2ee.scss Parādīt failu

1
+#e2ee-section {
2
+    .title {
3
+        font-weight: 700;
4
+    }
5
+
6
+    .description {
7
+        font-size: .8em;
8
+        margin: 15px 0;
9
+    }
10
+
11
+    .key-field {
12
+        align-items: center;
13
+        display: flex;
14
+        flex-direction: row;
15
+
16
+        label {
17
+            font-weight: 700;
18
+        }
19
+
20
+        input {
21
+            background-color: inherit;
22
+            border: none;
23
+            color: inherit;
24
+            flex: 1;
25
+            padding: 0 5px;
26
+        }
27
+
28
+        a {
29
+            color: #6FB1EA;
30
+            cursor: pointer;
31
+            font-size: 14px;
32
+            text-decoration: none;
33
+        }
34
+    }
35
+}

+ 1
- 0
css/main.scss Parādīt failu

98
 @import 'modals/invite/invite_more';
98
 @import 'modals/invite/invite_more';
99
 @import 'modals/security/security';
99
 @import 'modals/security/security';
100
 @import 'premeeting-screens';
100
 @import 'premeeting-screens';
101
+@import 'e2ee';
101
 
102
 
102
 /* Modules END */
103
 /* Modules END */

+ 1
- 2
interface_config.js Parādīt failu

49
         'fodeviceselection', 'hangup', 'profile', 'chat', 'recording',
49
         'fodeviceselection', 'hangup', 'profile', 'chat', 'recording',
50
         'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
50
         'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
51
         'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts',
51
         'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts',
52
-        'tileview', 'videobackgroundblur', 'download', 'help', 'mute-everyone',
53
-        'e2ee', 'security'
52
+        'tileview', 'videobackgroundblur', 'download', 'help', 'mute-everyone', 'security'
54
     ],
53
     ],
55
 
54
 
56
     SETTINGS_SECTIONS: [ 'devices', 'language', 'moderator', 'profile', 'calendar' ],
55
     SETTINGS_SECTIONS: [ 'devices', 'language', 'moderator', 'profile', 'calendar' ],

+ 1
- 1
lang/main-el.json Parādīt failu

178
         "e2eeDescription": "<p>Η από άκρη σε άκρη κρυπτογράφηση είναι σήμερα <strong>σε ΠΕΙΡΑΜΑΤΙΚΟ στάδιο</strong>. Παρακαλώ δείτε <a href='https://jitsi.org/blog/e2ee/' target='_blank'>αυτήν την ανάρτηση</a> για λεπτομέρειες.</p><br/><p>Παρακαλώ να έχετε κατά νου ότι η ενεργοποίηση της από άκρη σε άκρη κρυπτογράφησης θα απενεργοποιήσει από την πλευρά του διακομιστή υπηρεσίες όπως: καταγραφή, live streaming και συμμετοχή μέσω τηλεφώνου. Επίσης, να έχετε κατά νου ότι η συνάντηση θα λειτουργήσει μόνο για τους ανθρώπους που συνδέονται από φυλλομετρητές με υποστήριξη για insertable streams.</p>",
178
         "e2eeDescription": "<p>Η από άκρη σε άκρη κρυπτογράφηση είναι σήμερα <strong>σε ΠΕΙΡΑΜΑΤΙΚΟ στάδιο</strong>. Παρακαλώ δείτε <a href='https://jitsi.org/blog/e2ee/' target='_blank'>αυτήν την ανάρτηση</a> για λεπτομέρειες.</p><br/><p>Παρακαλώ να έχετε κατά νου ότι η ενεργοποίηση της από άκρη σε άκρη κρυπτογράφησης θα απενεργοποιήσει από την πλευρά του διακομιστή υπηρεσίες όπως: καταγραφή, live streaming και συμμετοχή μέσω τηλεφώνου. Επίσης, να έχετε κατά νου ότι η συνάντηση θα λειτουργήσει μόνο για τους ανθρώπους που συνδέονται από φυλλομετρητές με υποστήριξη για insertable streams.</p>",
179
         "e2eeLabel": "Κλειδί",
179
         "e2eeLabel": "Κλειδί",
180
         "e2eeTitle": "Από άκρη σε άκρη κρυπτογράφηση",
180
         "e2eeTitle": "Από άκρη σε άκρη κρυπτογράφηση",
181
-        "e2eeWarning": "<br /><p><strong>ΠΡΟΕΙΔΟΠΟΊΗΣΗ:</strong> Δε φαίνεται να έχουν όλοι οι συμμετέχοντες στη συνάντηση αυτή υποστήριξη για από άκρη σε άκρη κρυπτογράφηση. Αν την ενεργοποιήσετε, δεν θα μπορέσουν να σας δουν ούτε να σας ακούσουν.</p>",
181
+        "e2eeWarning": "ΠΡΟΕΙΔΟΠΟΊΗΣΗ: Δε φαίνεται να έχουν όλοι οι συμμετέχοντες στη συνάντηση αυτή υποστήριξη για από άκρη σε άκρη κρυπτογράφηση. Αν την ενεργοποιήσετε, δεν θα μπορέσουν να σας δουν ούτε να σας ακούσουν.",
182
         "enterDisplayName": "Παρακαλώ εισάγετε το όνομά σας εδώ",
182
         "enterDisplayName": "Παρακαλώ εισάγετε το όνομά σας εδώ",
183
         "error": "Σφάλμα",
183
         "error": "Σφάλμα",
184
         "externalInstallationMsg": "Θα πρέπει να εγκαταστήσετε την επέκτασή μας για διαμοιρασμό επιφάνειας εργασίας.",
184
         "externalInstallationMsg": "Θα πρέπει να εγκαταστήσετε την επέκτασή μας για διαμοιρασμό επιφάνειας εργασίας.",

+ 1
- 1
lang/main-es.json Parādīt failu

198
         "e2eeDescription": "<p>El cifrado Extremo-a-Extremo es actualmente <strong>EXPERIMENTAL</strong>. Por favor lea<a href='https://jitsi.org/blog/e2ee/' target='_blank'>este artículo</a> para más detalles.</p><br/><p>Tenga en cuenta que activar el cifrado extremo-a-extremo puede deshabilitar servicios en el servidor como: grabación, transmisión en vivo y participación telefónica. Sin embargo tenga en cuenta que esta reunion solo funcionará con personas que se unan usando un navegador.</p>",
198
         "e2eeDescription": "<p>El cifrado Extremo-a-Extremo es actualmente <strong>EXPERIMENTAL</strong>. Por favor lea<a href='https://jitsi.org/blog/e2ee/' target='_blank'>este artículo</a> para más detalles.</p><br/><p>Tenga en cuenta que activar el cifrado extremo-a-extremo puede deshabilitar servicios en el servidor como: grabación, transmisión en vivo y participación telefónica. Sin embargo tenga en cuenta que esta reunion solo funcionará con personas que se unan usando un navegador.</p>",
199
         "e2eeLabel": "Clave",
199
         "e2eeLabel": "Clave",
200
         "e2eeTitle": "Cifrado Extremo-a-Extremo",
200
         "e2eeTitle": "Cifrado Extremo-a-Extremo",
201
-        "e2eeWarning": "<br /><p><strong>ATENCION:</strong> No todos los participantes de esta reunión soportan cifrado Extremo-a-Extremo. Si usted habilita el cifrado ellos no podrán verlo ni oirlo.</p>",
201
+        "e2eeWarning": "ATENCION: No todos los participantes de esta reunión soportan cifrado Extremo-a-Extremo. Si usted habilita el cifrado ellos no podrán verlo ni oirlo.",
202
         "enterDisplayName": "Por favor ingresa tu nombre aquí",
202
         "enterDisplayName": "Por favor ingresa tu nombre aquí",
203
         "error": "Error",
203
         "error": "Error",
204
         "externalInstallationMsg": "Necesita instalar nuestra extensión para compartir escritorio.",
204
         "externalInstallationMsg": "Necesita instalar nuestra extensión para compartir escritorio.",

+ 1
- 1
lang/main-esUS.json Parādīt failu

197
         "e2eeDescription": "<p>El cifrado Extremo-a-Extremo es actualmente <strong>EXPERIMENTAL</strong>. Por favor lea<a href='https://jitsi.org/blog/e2ee/' target='_blank'>este artículo</a> para más detalles.</p><br/><p>Tenga en cuenta que activar el cifrado extremo-a-extremo puede deshabilitar servicios en el servidor como: grabación, transmisión en vivo y participación telefónica. Sin embargo tenga en cuenta que esta reunion solo funcionará con personas que se unan usando un navegador.</p>",
197
         "e2eeDescription": "<p>El cifrado Extremo-a-Extremo es actualmente <strong>EXPERIMENTAL</strong>. Por favor lea<a href='https://jitsi.org/blog/e2ee/' target='_blank'>este artículo</a> para más detalles.</p><br/><p>Tenga en cuenta que activar el cifrado extremo-a-extremo puede deshabilitar servicios en el servidor como: grabación, transmisión en vivo y participación telefónica. Sin embargo tenga en cuenta que esta reunion solo funcionará con personas que se unan usando un navegador.</p>",
198
         "e2eeLabel": "Clave",
198
         "e2eeLabel": "Clave",
199
         "e2eeTitle": "Cifrado Extremo-a-Exremo",
199
         "e2eeTitle": "Cifrado Extremo-a-Exremo",
200
-        "e2eeWarning": "<br /><p><strong>ATENCION:</strong> No todos los participantes de esta reunión soportan cifrado Extremo-a-Extremo. Si usted habilita el cifrado ellos no podrán verlo ni oirlo.</p>",
200
+        "e2eeWarning": "ATENCION: No todos los participantes de esta reunión soportan cifrado Extremo-a-Extremo. Si usted habilita el cifrado ellos no podrán verlo ni oirlo.",
201
         "enterDisplayName": "Por favor ingresa tu nombre aquí",
201
         "enterDisplayName": "Por favor ingresa tu nombre aquí",
202
         "error": "Error",
202
         "error": "Error",
203
         "externalInstallationMsg": "Necesita instalar nuestra extensión para compartir escritorio.",
203
         "externalInstallationMsg": "Necesita instalar nuestra extensión para compartir escritorio.",

+ 1
- 1
lang/main-mr.json Parādīt failu

178
         "e2eeDescription": "<p>एंड-टू-एंड एनक्रिप्शन सध्या आहे <strong>प्रायोगिक</strong>. कृपया पहा <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a>तपशीलांसाठी.</p><br/><p>कृपया लक्षात ठेवा की एंड-टू-एंड एन्क्रिप्शन चालू केल्याने सर्व्हर-साइड प्रदान सेवा प्रभावीपणे अक्षम होईल: रेकॉर्डिंग, थेट प्रवाह आणि फोन सहभाग. हे देखील लक्षात ठेवा की मीटिंग केवळ समाविष्ट करण्यायोग्य प्रवाहांसाठी समर्थन असलेल्या ब्राउझरमधून सामील झालेल्या लोकांसाठीच कार्य करेल.</p>",
178
         "e2eeDescription": "<p>एंड-टू-एंड एनक्रिप्शन सध्या आहे <strong>प्रायोगिक</strong>. कृपया पहा <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a>तपशीलांसाठी.</p><br/><p>कृपया लक्षात ठेवा की एंड-टू-एंड एन्क्रिप्शन चालू केल्याने सर्व्हर-साइड प्रदान सेवा प्रभावीपणे अक्षम होईल: रेकॉर्डिंग, थेट प्रवाह आणि फोन सहभाग. हे देखील लक्षात ठेवा की मीटिंग केवळ समाविष्ट करण्यायोग्य प्रवाहांसाठी समर्थन असलेल्या ब्राउझरमधून सामील झालेल्या लोकांसाठीच कार्य करेल.</p>",
179
         "e2eeLabel": "Key",
179
         "e2eeLabel": "Key",
180
         "e2eeTitle": "एंड-टू-एंड एनक्रिप्शन",
180
         "e2eeTitle": "एंड-टू-एंड एनक्रिप्शन",
181
-        "e2eeWarning": "<br /><p><strong>चेतावणी:</strong>या बैठकीतील सर्व सहभागींना एंड-टू-एंड एनक्रिप्शनसाठी समर्थन असल्याचे दिसत नाही. आपण सक्षम केल्यास ते आपल्याला पाहण्यास किंवा ऐकण्यास सक्षम राहणार नाहीत.</p>",
181
+        "e2eeWarning": "चेतावणी:या बैठकीतील सर्व सहभागींना एंड-टू-एंड एनक्रिप्शनसाठी समर्थन असल्याचे दिसत नाही. आपण सक्षम केल्यास ते आपल्याला पाहण्यास किंवा ऐकण्यास सक्षम राहणार नाहीत.",
182
         "enterDisplayName": "कृपया आपले नाव येथे प्रविष्ट करा",
182
         "enterDisplayName": "कृपया आपले नाव येथे प्रविष्ट करा",
183
         "error": "त्रुटी",
183
         "error": "त्रुटी",
184
         "externalInstallationMsg": "आपल्याला आमचा डेस्कटॉप सामायिकरण विस्तार स्थापित करणे आवश्यक आहे.",
184
         "externalInstallationMsg": "आपल्याला आमचा डेस्कटॉप सामायिकरण विस्तार स्थापित करणे आवश्यक आहे.",

+ 1
- 1
lang/main-sl.json Parādīt failu

192
         "e2eeDescription": "<p>End-to-End Encryption is currently <strong>EXPERIMENTAL</strong>. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details.</p><br/><p>Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.</p>",
192
         "e2eeDescription": "<p>End-to-End Encryption is currently <strong>EXPERIMENTAL</strong>. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details.</p><br/><p>Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.</p>",
193
         "e2eeLabel": "Key",
193
         "e2eeLabel": "Key",
194
         "e2eeTitle": "End-to-End Encryption",
194
         "e2eeTitle": "End-to-End Encryption",
195
-        "e2eeWarning": "<br /><p><strong>WARNING:</strong> 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.</p>",
195
+        "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.",
196
         "enterDisplayName": "Prosimo vnesite svoje ime",
196
         "enterDisplayName": "Prosimo vnesite svoje ime",
197
         "error": "Napaka",
197
         "error": "Napaka",
198
         "externalInstallationMsg": "Potrebno je namestiti razširitev za deljenje namizja.",
198
         "externalInstallationMsg": "Potrebno je namestiti razširitev za deljenje namizja.",

+ 1
- 1
lang/main-uk.json Parādīt failu

183
         "e2eeDescription": "<p>Наскрізне шифрування зараз в режимі<strong>ТЕСТУВАННЯ</strong>. Будь ласка, перегляньте <a href='https://jitsi.org/blog/e2ee/' target='_blank'>цю публікацію</a> для докладної інформації.</p><br/><p>Зверніть увагу, що увімкнення наскрізного шифрування призведе до вимкнення таких служб на стороні сервера: запису, живої трансляції запису в онлайні та участі у конференції за допомогою вхідного телефонного дзвінка. Також, просимо звернути увагу, що приєднання до зустрічі в такому разі буде можливе лише з браузера, який має підтримувати потоки зі вставкою (insertable streams).</p>",
183
         "e2eeDescription": "<p>Наскрізне шифрування зараз в режимі<strong>ТЕСТУВАННЯ</strong>. Будь ласка, перегляньте <a href='https://jitsi.org/blog/e2ee/' target='_blank'>цю публікацію</a> для докладної інформації.</p><br/><p>Зверніть увагу, що увімкнення наскрізного шифрування призведе до вимкнення таких служб на стороні сервера: запису, живої трансляції запису в онлайні та участі у конференції за допомогою вхідного телефонного дзвінка. Також, просимо звернути увагу, що приєднання до зустрічі в такому разі буде можливе лише з браузера, який має підтримувати потоки зі вставкою (insertable streams).</p>",
184
         "e2eeLabel": "Ключ",
184
         "e2eeLabel": "Ключ",
185
         "e2eeTitle": "Наскрізне шифрування",
185
         "e2eeTitle": "Наскрізне шифрування",
186
-        "e2eeWarning": "<br /><p><strong>УВАГА:</strong> Схоже, що не всі учасники цієї зустрічі мають підтримку технології наскрізного шифрування. Якщо ви увімкнете цю функцію, то вони не зможуть ані чути, ані бачити вас.</p>",
186
+        "e2eeWarning": "УВАГА: Схоже, що не всі учасники цієї зустрічі мають підтримку технології наскрізного шифрування. Якщо ви увімкнете цю функцію, то вони не зможуть ані чути, ані бачити вас.",
187
         "enterDisplayName": "Будь ласка, зазначте ваше ім'я",
187
         "enterDisplayName": "Будь ласка, зазначте ваше ім'я",
188
         "error": "Помилка",
188
         "error": "Помилка",
189
         "externalInstallationMsg": "Вам потрібно встановити наше розширення для спільного доступу до стільниці.",
189
         "externalInstallationMsg": "Вам потрібно встановити наше розширення для спільного доступу до стільниці.",

+ 5
- 2
lang/main.json Parādīt failu

193
         "dismiss": "Dismiss",
193
         "dismiss": "Dismiss",
194
         "displayNameRequired": "Hi! What’s your name?",
194
         "displayNameRequired": "Hi! What’s your name?",
195
         "done": "Done",
195
         "done": "Done",
196
-        "e2eeDescription": "<p>End-to-End Encryption is currently <strong>EXPERIMENTAL</strong>. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details.</p><br/><p>Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.</p>",
196
+        "e2eeDescription": "End-to-End Encryption is currently EXPERIMENTAL. Please see <a href='https://jitsi.org/blog/e2ee/' target='_blank'>this post</a> for details. Please keep in mind that turning on end-to-end encryption will effectively disable server-side provided services such as: recording, live streaming and phone participation. Also keep in mind that the meeting will only work for people joining from browsers with support for insertable streams.",
197
         "e2eeLabel": "Key",
197
         "e2eeLabel": "Key",
198
+        "e2eeNoKey": "None",
198
         "e2eeTitle": "End-to-End Encryption",
199
         "e2eeTitle": "End-to-End Encryption",
199
-        "e2eeWarning": "<br /><p><strong>WARNING:</strong> 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.</p>",
200
+        "e2eeToggleSet": "Set key",
201
+        "e2eeSet": "Set",
202
+        "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.",
200
         "enterDisplayName": "Please enter your name here",
203
         "enterDisplayName": "Please enter your name here",
201
         "error": "Error",
204
         "error": "Error",
202
         "externalInstallationMsg": "You need to install our desktop sharing extension.",
205
         "externalInstallationMsg": "You need to install our desktop sharing extension.",

+ 0
- 76
react/features/e2ee/components/E2EEButton.js Parādīt failu

1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { createE2EEEvent, sendAnalytics } from '../../analytics';
6
-import { openDialog } from '../../base/dialog';
7
-import { translate } from '../../base/i18n';
8
-import { IconRoomUnlock } from '../../base/icons';
9
-import { connect } from '../../base/redux';
10
-import { AbstractButton, BetaTag } from '../../base/toolbox';
11
-import type { AbstractButtonProps } from '../../base/toolbox';
12
-
13
-import E2EEDialog from './E2EEDialog';
14
-
15
-
16
-type Props = AbstractButtonProps & {
17
-
18
-    /**
19
-     * The redux {@code dispatch} function.
20
-     */
21
-    dispatch: Function
22
-
23
-};
24
-
25
-/**
26
- * Button that open a dialog to set the E2EE key.
27
- */
28
-class E2EEButton extends AbstractButton<Props, *> {
29
-    accessibilityLabel = 'toolbar.accessibilityLabel.e2ee';
30
-    icon = IconRoomUnlock;
31
-    label = 'toolbar.e2ee';
32
-    tooltip = 'toolbar.e2ee';
33
-
34
-    /**
35
-     * Helper function to be implemented by subclasses, which returns
36
-     * a React Element to display (a beta tag) at the end of the button.
37
-     *
38
-     * @override
39
-     * @protected
40
-     * @returns {ReactElement}
41
-     */
42
-    _getElementAfter() {
43
-        return <BetaTag />;
44
-    }
45
-
46
-    /**
47
-     * Handles clicking / pressing the button, and opens the E2EE dialog.
48
-     *
49
-     * @protected
50
-     * @returns {void}
51
-     */
52
-    _handleClick() {
53
-        sendAnalytics(createE2EEEvent('dialog.open'));
54
-        this.props.dispatch(openDialog(E2EEDialog));
55
-    }
56
-}
57
-
58
-/**
59
- * Maps (parts of) the redux state to the associated props for this component.
60
- *
61
- * @param {Object} state - The Redux state.
62
- * @param {Props} ownProps - The own props of the Component.
63
- * @private
64
- * @returns {Props}
65
- */
66
-export function mapStateToProps(state: Object, ownProps: Props) {
67
-    const { e2eeSupported } = state['features/base/conference'];
68
-    const { visible = Boolean(e2eeSupported) } = ownProps;
69
-
70
-    return {
71
-        visible
72
-    };
73
-}
74
-
75
-
76
-export default translate(connect(mapStateToProps)(E2EEButton));

react/features/e2ee/components/E2EEDialog.js → react/features/e2ee/components/E2EESection.js Parādīt failu

1
 /* @flow */
1
 /* @flow */
2
 
2
 
3
-import { FieldTextStateless as TextField } from '@atlaskit/field-text';
4
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
5
 import type { Dispatch } from 'redux';
4
 import type { Dispatch } from 'redux';
6
 
5
 
7
 import { createE2EEEvent, sendAnalytics } from '../../analytics';
6
 import { createE2EEEvent, sendAnalytics } from '../../analytics';
8
-import { Dialog } from '../../base/dialog';
9
 import { translate, translateToHTML } from '../../base/i18n';
7
 import { translate, translateToHTML } from '../../base/i18n';
10
 import { getParticipants } from '../../base/participants';
8
 import { getParticipants } from '../../base/participants';
11
 import { connect } from '../../base/redux';
9
 import { connect } from '../../base/redux';
37
 
35
 
38
 type State = {
36
 type State = {
39
 
37
 
38
+    /**
39
+     * True if the key is being edited.
40
+     */
41
+    editing: boolean,
42
+
40
     /**
43
     /**
41
      * The current E2EE key.
44
      * The current E2EE key.
42
      */
45
      */
44
 };
47
 };
45
 
48
 
46
 /**
49
 /**
47
- * Implements a React {@code Component} for displaying a dialog with a field
50
+ * Implements a React {@code Component} for displaying a security dialog section with a field
48
  * for setting the E2EE key.
51
  * for setting the E2EE key.
49
  *
52
  *
50
  * @extends Component
53
  * @extends Component
51
  */
54
  */
52
-class E2EEDialog extends Component<Props, State> {
55
+class E2EESection extends Component<Props, State> {
56
+    fieldRef: Object;
57
+
53
     /**
58
     /**
54
      * Initializes a new {@code E2EEDialog  } instance.
59
      * Initializes a new {@code E2EEDialog  } instance.
55
      *
60
      *
59
     constructor(props: Props) {
64
     constructor(props: Props) {
60
         super(props);
65
         super(props);
61
 
66
 
67
+        this.fieldRef = React.createRef();
68
+
62
         this.state = {
69
         this.state = {
70
+            editing: false,
63
             key: this.props._key
71
             key: this.props._key
64
         };
72
         };
65
 
73
 
66
         // Bind event handlers so they are only bound once for every instance.
74
         // Bind event handlers so they are only bound once for every instance.
67
         this._onKeyChange = this._onKeyChange.bind(this);
75
         this._onKeyChange = this._onKeyChange.bind(this);
68
-        this._onSubmit = this._onSubmit.bind(this);
76
+        this._onSet = this._onSet.bind(this);
77
+        this._onToggleSetKey = this._onToggleSetKey.bind(this);
69
     }
78
     }
70
 
79
 
71
     /**
80
     /**
76
      */
85
      */
77
     render() {
86
     render() {
78
         const { _everyoneSupportsE2EE, t } = this.props;
87
         const { _everyoneSupportsE2EE, t } = this.props;
88
+        const { editing } = this.state;
79
 
89
 
80
         return (
90
         return (
81
-            <Dialog
82
-                isModal = { false }
83
-                onSubmit = { this._onSubmit }
84
-                titleKey = 'dialog.e2eeTitle'
85
-                width = 'small'>
86
-                <div className = 'e2ee-destription'>
91
+            <div id = 'e2ee-section'>
92
+                <p className = 'title'>
93
+                    { t('dialog.e2eeTitle') }
94
+                </p>
95
+                <p className = 'description'>
87
                     { translateToHTML(t, 'dialog.e2eeDescription') }
96
                     { translateToHTML(t, 'dialog.e2eeDescription') }
88
-                </div>
97
+                </p>
89
                 {
98
                 {
90
                     !_everyoneSupportsE2EE
99
                     !_everyoneSupportsE2EE
91
-                        && <div className = 'e2ee-warn'>
92
-                            { translateToHTML(t, 'dialog.e2eeWarning') }
93
-                        </div>
100
+                        && <span className = 'warning'>
101
+                            { t('dialog.e2eeWarning') }
102
+                        </span>
94
                 }
103
                 }
95
-                <TextField
96
-                    autoFocus = { true }
97
-                    compact = { true }
98
-                    label = { t('dialog.e2eeLabel') }
99
-                    name = 'e2eeKey'
100
-                    onChange = { this._onKeyChange }
101
-                    shouldFitContainer = { true }
102
-                    type = 'password'
103
-                    value = { this.state.key } />
104
-            </Dialog>);
104
+                <div className = 'key-field'>
105
+                    <label>
106
+                        { t('dialog.e2eeLabel') }:
107
+                    </label>
108
+                    <input
109
+                        disabled = { !editing }
110
+                        name = 'e2eeKey'
111
+                        onChange = { this._onKeyChange }
112
+                        placeholder = { t('dialog.e2eeNoKey') }
113
+                        ref = { this.fieldRef }
114
+                        type = 'password'
115
+                        value = { this.state.key } />
116
+                    { editing && <a onClick = { this._onSet }>
117
+                        { t('dialog.e2eeSet') }
118
+                    </a> }
119
+                    { !editing && <a onClick = { this._onToggleSetKey }>
120
+                        { t('dialog.e2eeToggleSet') }
121
+                    </a> }
122
+                </div>
123
+            </div>
124
+        );
105
     }
125
     }
106
 
126
 
107
     _onKeyChange: (Object) => void;
127
     _onKeyChange: (Object) => void;
117
         this.setState({ key: event.target.value.trim() });
137
         this.setState({ key: event.target.value.trim() });
118
     }
138
     }
119
 
139
 
120
-    _onSubmit: () => boolean;
140
+    _onSet: () => void;
121
 
141
 
122
     /**
142
     /**
123
-     * Dispatches an action to update the E2EE key.
143
+     * Dispatches an action to set/unset the E2EE key.
124
      *
144
      *
125
      * @private
145
      * @private
126
-     * @returns {boolean}
146
+     * @returns {void}
127
      */
147
      */
128
-    _onSubmit() {
148
+    _onSet() {
129
         const { key } = this.state;
149
         const { key } = this.state;
130
 
150
 
131
         sendAnalytics(createE2EEEvent(`key.${key ? 'set' : 'unset'}`));
151
         sendAnalytics(createE2EEEvent(`key.${key ? 'set' : 'unset'}`));
132
         this.props.dispatch(setE2EEKey(key));
152
         this.props.dispatch(setE2EEKey(key));
133
 
153
 
134
-        return true;
154
+        this.setState({
155
+            editing: false
156
+        });
157
+    }
158
+
159
+    _onToggleSetKey: () => void;
160
+
161
+    /**
162
+     * Sets the section into edit mode so then the user can set the key.
163
+     *
164
+     * @returns {void}
165
+     */
166
+    _onToggleSetKey() {
167
+        this.setState({
168
+            editing: true
169
+        }, () => {
170
+            this.fieldRef.current.focus();
171
+        });
135
     }
172
     }
136
 }
173
 }
137
 
174
 
152
     };
189
     };
153
 }
190
 }
154
 
191
 
155
-export default translate(connect(mapStateToProps)(E2EEDialog));
192
+export default translate(connect(mapStateToProps)(E2EESection));

+ 1
- 2
react/features/e2ee/components/index.web.js Parādīt failu

1
-export { default as E2EEButton } from './E2EEButton';
2
-export { default as E2EEDialog } from './E2EEDialog';
1
+export { default as E2EESection } from './E2EESection';
3
 export { default as E2EELabel } from './E2EELabel';
2
 export { default as E2EELabel } from './E2EELabel';

+ 3
- 0
react/features/security/components/security-dialog/SecurityDialog.js Parādīt failu

7
 import { translate } from '../../../base/i18n';
7
 import { translate } from '../../../base/i18n';
8
 import { isLocalParticipantModerator } from '../../../base/participants';
8
 import { isLocalParticipantModerator } from '../../../base/participants';
9
 import { connect } from '../../../base/redux';
9
 import { connect } from '../../../base/redux';
10
+import { E2EESection } from '../../../e2ee/components';
10
 import { LobbySection } from '../../../lobby';
11
 import { LobbySection } from '../../../lobby';
11
 
12
 
12
 import Header from './Header';
13
 import Header from './Header';
92
                     passwordNumberOfDigits = { _passwordNumberOfDigits }
93
                     passwordNumberOfDigits = { _passwordNumberOfDigits }
93
                     setPassword = { setPassword }
94
                     setPassword = { setPassword }
94
                     setPasswordEditEnabled = { setPasswordEditEnabled } />
95
                     setPasswordEditEnabled = { setPasswordEditEnabled } />
96
+                <div className = 'separator-line' />
97
+                <E2EESection />
95
             </div>
98
             </div>
96
         </Dialog>
99
         </Dialog>
97
     );
100
     );

+ 0
- 5
react/features/toolbox/components/web/Toolbox.js Parādīt failu

33
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
33
 import { getLocalVideoTrack, toggleScreensharing } from '../../../base/tracks';
34
 import { VideoBlurButton } from '../../../blur';
34
 import { VideoBlurButton } from '../../../blur';
35
 import { ChatCounter, toggleChat } from '../../../chat';
35
 import { ChatCounter, toggleChat } from '../../../chat';
36
-import { E2EEButton } from '../../../e2ee';
37
 import { SharedDocumentButton } from '../../../etherpad';
36
 import { SharedDocumentButton } from '../../../etherpad';
38
 import { openFeedbackDialog } from '../../../feedback';
37
 import { openFeedbackDialog } from '../../../feedback';
39
 import { beginAddPeople } from '../../../invite';
38
 import { beginAddPeople } from '../../../invite';
1009
                     key = 'stats'
1008
                     key = 'stats'
1010
                     onClick = { this._onToolbarOpenSpeakerStats }
1009
                     onClick = { this._onToolbarOpenSpeakerStats }
1011
                     text = { t('toolbar.speakerStats') } />,
1010
                     text = { t('toolbar.speakerStats') } />,
1012
-            this._shouldShowButton('e2ee')
1013
-                && <E2EEButton
1014
-                    key = 'e2ee'
1015
-                    showLabel = { true } />,
1016
             this._shouldShowButton('feedback')
1011
             this._shouldShowButton('feedback')
1017
                 && _feedbackConfigured
1012
                 && _feedbackConfigured
1018
                 && <OverflowMenuItem
1013
                 && <OverflowMenuItem

Notiek ielāde…
Atcelt
Saglabāt