Skip to content

Commit

Permalink
fixup! fix(setting): Show setting only with HPB and adjust condition …
Browse files Browse the repository at this point in the history
…for being able to enable it

Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Jan 15, 2025
1 parent be36816 commit 1c2c3e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/AdminSettings/GeneralSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default {
hasFeatureJoinFeatures: false,
hasSignalingServers: false,
isE2EECallsEnabled: false,
hasSIPBridge: false, // FIXME Based on loadState('spreed', 'sip_bridge_shared_secret') but should update with live data?
hasSIPBridge: !!loadState('spreed', 'sip_bridge_shared_secret'),
}
},

Expand All @@ -126,11 +126,13 @@ export default {
this.updateSignalingServers(signaling.servers)
EventBus.on('signaling-servers-updated', this.updateSignalingServers)
EventBus.on('signaling-server-connected', this.updateSignalingDetails)
EventBus.on('sip-settings-updated', this.updateSipDetails)
},

beforeDestroy() {
EventBus.off('signaling-servers-updated', this.updateSignalingServers)
EventBus.off('signaling-server-connected', this.updateSignalingDetails)
EventBus.off('sip-settings-updated', this.updateSipDetails)
},

methods: {
Expand All @@ -144,6 +146,10 @@ export default {
this.hasFeatureJoinFeatures = signaling.hasFeature('join-features')
},

updateSipDetails(settings) {
this.hasSIPBridge = !!settings.sharedSecret
},

updateE2EECallsEnabled(value) {
this.loading = true
OCP.AppConfig.setValue('spreed', 'call_end_to_end_encryption', value ? '1' : '0', {
Expand Down
1 change: 1 addition & 0 deletions src/components/AdminSettings/SIPBridge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export default {
dialOutEnabled: this.dialOutEnabled,
sipGroups: this.sipGroups.map(group => group.id).join('_')
}
EventBus.emit('sip-settings-updated', this.currentSetup)
},

async saveSIPSettings() {
Expand Down

0 comments on commit 1c2c3e4

Please sign in to comment.