Browse Source

fix(e2ee): hide if not supported.

master
Hristo Terezov 5 years ago
parent
commit
cab830aad1

+ 16
- 3
react/features/security/components/security-dialog/SecurityDialog.js View File

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

Loading…
Cancel
Save