From be36816073f35e5129c7aa3fab42f06d5d15550d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 15 Jan 2025 12:48:19 +0100 Subject: [PATCH] fix(setting): Show setting only with HPB and adjust condition for being able to enable it Signed-off-by: Joas Schilling --- .../AdminSettings/GeneralSettings.vue | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/components/AdminSettings/GeneralSettings.vue b/src/components/AdminSettings/GeneralSettings.vue index a68d1406e01..53332fbfbb3 100644 --- a/src/components/AdminSettings/GeneralSettings.vue +++ b/src/components/AdminSettings/GeneralSettings.vue @@ -39,24 +39,26 @@ {{ t('spreed', 'Allow conversations on public shares for files') }} -

- {{ t('spreed', 'End-to-end encrypted calls') }} - {{ t('spreed', 'Beta') }} -

- - - {{ t('spreed', 'Enable encryption') }} - - - - + @@ -96,9 +98,10 @@ export default { conversationsFiles: parseInt(loadState('spreed', 'conversations_files')) === 1, conversationsFilesPublicShares: parseInt(loadState('spreed', 'conversations_files_public_shares')) === 1, - hasE2EEFeature: false, + hasFeatureJoinFeatures: false, hasSignalingServers: false, isE2EECallsEnabled: false, + hasSIPBridge: false, // FIXME Based on loadState('spreed', 'sip_bridge_shared_secret') but should update with live data? } }, @@ -109,8 +112,8 @@ export default { isConversationsFilesPublicSharesChecked() { return this.conversationsFilesPublicShares }, - canEnableE2EE() { - return this.hasE2EEFeature && this.hasSignalingServers + canEnableE2EECalls() { + return this.hasFeatureJoinFeatures || !this.hasSIPBridge }, }, @@ -138,7 +141,7 @@ export default { }, updateSignalingDetails(signaling) { - this.hasE2EEFeature = signaling.hasFeature('join-features') + this.hasFeatureJoinFeatures = signaling.hasFeature('join-features') }, updateE2EECallsEnabled(value) {