Selaa lähdekoodia

fix(e2ee): hide if not supported.

master
Hristo Terezov 5 vuotta sitten
vanhempi
commit
cab830aad1

+ 16
- 3
react/features/security/components/security-dialog/SecurityDialog.js Näytä tiedosto

@@ -42,6 +42,11 @@ type Props = {
42 42
      */
43 43
     _passwordNumberOfDigits: ?number,
44 44
 
45
+    /**
46
+     * Indicates whether e2ee will be displayed or not.
47
+     */
48
+    _showE2ee: boolean,
49
+
45 50
     /**
46 51
      * Action that sets the conference password.
47 52
      */
@@ -64,6 +69,7 @@ function SecurityDialog({
64 69
     _locked,
65 70
     _password,
66 71
     _passwordNumberOfDigits,
72
+    _showE2ee,
67 73
     setPassword
68 74
 }: Props) {
69 75
     const [ passwordEditEnabled, setPasswordEditEnabled ] = useState(false);
@@ -93,8 +99,13 @@ function SecurityDialog({
93 99
                     passwordNumberOfDigits = { _passwordNumberOfDigits }
94 100
                     setPassword = { setPassword }
95 101
                     setPasswordEditEnabled = { setPasswordEditEnabled } />
96
-                <div className = 'separator-line' />
97
-                <E2EESection />
102
+                {
103
+                    _showE2ee ? <>
104
+                        <div className = 'separator-line' />
105
+                        <E2EESection />
106
+                    </> : null
107
+                }
108
+
98 109
             </div>
99 110
         </Dialog>
100 111
     );
@@ -111,6 +122,7 @@ function SecurityDialog({
111 122
 function mapStateToProps(state) {
112 123
     const {
113 124
         conference,
125
+        e2eeSupported,
114 126
         locked,
115 127
         password
116 128
     } = state['features/base/conference'];
@@ -120,7 +132,8 @@ function mapStateToProps(state) {
120 132
         _conference: conference,
121 133
         _dialIn: state['features/invite'],
122 134
         _locked: locked,
123
-        _password: password
135
+        _password: password,
136
+        _showE2ee: Boolean(e2eeSupported)
124 137
     };
125 138
 }
126 139
 

Loading…
Peruuta
Tallenna