Merge pull request #7080 from jitsi/fix-e2ee

fix(e2ee): hide if not supported.
This commit is contained in:
Aaron van Meerten 2020-06-18 13:14:35 -05:00 committed by GitHub
commit 7b429afee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 3 deletions

View File

@ -42,6 +42,11 @@ type Props = {
*/
_passwordNumberOfDigits: ?number,
/**
* Indicates whether e2ee will be displayed or not.
*/
_showE2ee: boolean,
/**
* Action that sets the conference password.
*/
@ -64,6 +69,7 @@ function SecurityDialog({
_locked,
_password,
_passwordNumberOfDigits,
_showE2ee,
setPassword
}: Props) {
const [ passwordEditEnabled, setPasswordEditEnabled ] = useState(false);
@ -93,8 +99,13 @@ function SecurityDialog({
passwordNumberOfDigits = { _passwordNumberOfDigits }
setPassword = { setPassword }
setPasswordEditEnabled = { setPasswordEditEnabled } />
<div className = 'separator-line' />
<E2EESection />
{
_showE2ee ? <>
<div className = 'separator-line' />
<E2EESection />
</> : null
}
</div>
</Dialog>
);
@ -111,6 +122,7 @@ function SecurityDialog({
function mapStateToProps(state) {
const {
conference,
e2eeSupported,
locked,
password
} = state['features/base/conference'];
@ -120,7 +132,8 @@ function mapStateToProps(state) {
_conference: conference,
_dialIn: state['features/invite'],
_locked: locked,
_password: password
_password: password,
_showE2ee: Boolean(e2eeSupported)
};
}