diff options
author | Joas Schilling <coding@schilljs.com> | 2021-03-24 14:31:28 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-24 14:31:28 +0300 |
commit | ac40fe7d59262b4c363c10eb7ea351ced6f50816 (patch) | |
tree | 1748c013506b7020e0899d0e76ce6b98ef007272 /src/components/AdminSettings | |
parent | 0ca57e008ebb9d5c9a0c067007aa22aa731d77e2 (diff) |
Hide SIP settings without a HPB
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/components/AdminSettings')
-rw-r--r-- | src/components/AdminSettings/SIPBridge.vue | 106 |
1 files changed, 58 insertions, 48 deletions
diff --git a/src/components/AdminSettings/SIPBridge.vue b/src/components/AdminSettings/SIPBridge.vue index 0873d5aee..473657cd5 100644 --- a/src/components/AdminSettings/SIPBridge.vue +++ b/src/components/AdminSettings/SIPBridge.vue @@ -24,59 +24,65 @@ <div id="sip-bridge" class="section"> <h2>{{ t('spreed', 'SIP configuration') }}</h2> - <h3>{{ t('spreed', 'Restrict SIP configuration') }}</h3> - - <p class="settings-hint"> - {{ t('spreed', 'Only users of the following groups can enable SIP in conversations they moderate') }} + <p v-if="!showForm" + class="settings-hint"> + {{ t('spreed', 'SIP configration is only possible with a high-performance backend.') }} </p> + <template v-else> + <h3>{{ t('spreed', 'Restrict SIP configuration') }}</h3> + + <p class="settings-hint"> + {{ t('spreed', 'Only users of the following groups can enable SIP in conversations they moderate') }} + </p> + + <Multiselect + v-model="sipGroups" + class="sip-bridge__sip-groups-select" + :options="groups" + :placeholder="t('spreed', 'Enable SIP configuration')" + :disabled="loading" + :multiple="true" + :searchable="true" + :tag-width="60" + :loading="loadingGroups" + :show-no-options="false" + :close-on-select="false" + track-by="id" + label="displayname" + @search-change="searchGroup" /> + + <h3>{{ t('spreed', 'Shared secret') }}</h3> + + <input v-model="sharedSecret" + type="text" + name="shared-secret" + class="sip-bridge__shared-secret" + :disabled="loading" + :placeholder="t('spreed', 'Shared secret')" + :aria-label="t('spreed', 'Shared secret')"> - <Multiselect - v-model="sipGroups" - class="sip-bridge__sip-groups-select" - :options="groups" - :placeholder="t('spreed', 'Enable SIP configuration')" - :disabled="loading" - :multiple="true" - :searchable="true" - :tag-width="60" - :loading="loadingGroups" - :show-no-options="false" - :close-on-select="false" - track-by="id" - label="displayname" - @search-change="searchGroup" /> - - <h3>{{ t('spreed', 'Shared secret') }}</h3> - - <input v-model="sharedSecret" - type="text" - name="shared-secret" - class="sip-bridge__shared-secret" - :disabled="loading" - :placeholder="t('spreed', 'Shared secret')" - :aria-label="t('spreed', 'Shared secret')"> - - <h3>{{ t('spreed', 'Dial-in information') }}</h3> - - <p class="settings-hint"> - {{ t('spreed', 'This information is sent in invitation emails as well as displayed in the sidebar to all participants.') }} - </p> + <h3>{{ t('spreed', 'Dial-in information') }}</h3> - <textarea - v-model="dialInInfo" - name="message" - class="sip-bridge__dialin-info" - rows="4" - :disabled="loading" - :placeholder="t('spreed', 'Phone number (Country)')" /> + <p class="settings-hint"> + {{ t('spreed', 'This information is sent in invitation emails as well as displayed in the sidebar to all participants.') }} + </p> - <p> - <button class="button primary" + <textarea + v-model="dialInInfo" + name="message" + class="sip-bridge__dialin-info" + rows="4" :disabled="loading" - @click="saveSIPSettings"> - {{ saveLabel }} - </button> - </p> + :placeholder="t('spreed', 'Phone number (Country)')" /> + + <p> + <button class="button primary" + :disabled="loading" + @click="saveSIPSettings"> + {{ saveLabel }} + </button> + </p> + </template> </div> </template> @@ -99,6 +105,7 @@ export default { return { loading: false, loadingGroups: false, + showForm: true, groups: [], sipGroups: [], saveLabel: t('spreed', 'Save changes'), @@ -117,6 +124,9 @@ export default { this.sharedSecret = loadState('spreed', 'sip_bridge_shared_secret') this.searchGroup('') this.loading = false + + const signaling = loadState('spreed', 'signaling_servers') + this.showForm = signaling.servers.length > 0 }, methods: { |