|
|
|
@ -10,63 +10,69 @@ |
|
|
|
{{ t('spreed', 'Recording backend') }} |
|
|
|
</h2> |
|
|
|
|
|
|
|
<NcNoteCard v-if="showUploadLimitWarning" type="warning"> |
|
|
|
{{ uploadLimitWarning }} |
|
|
|
<NcNoteCard v-if="!showForm" type="warning"> |
|
|
|
{{ t('spreed', 'Recording backend configuration is only possible with a high-performance backend.') }} |
|
|
|
</NcNoteCard> |
|
|
|
|
|
|
|
<TransitionWrapper v-if="servers.length" |
|
|
|
name="fade" |
|
|
|
tag="ul" |
|
|
|
group> |
|
|
|
<RecordingServer v-for="(server, index) in servers" |
|
|
|
:key="`server${index}`" |
|
|
|
:server.sync="servers[index].server" |
|
|
|
:verify.sync="servers[index].verify" |
|
|
|
:index="index" |
|
|
|
:loading="loading" |
|
|
|
@remove-server="removeServer" |
|
|
|
@update:server="debounceUpdateServers" |
|
|
|
@update:verify="debounceUpdateServers" /> |
|
|
|
</TransitionWrapper> |
|
|
|
|
|
|
|
<NcButton v-else |
|
|
|
class="additional-top-margin" |
|
|
|
:disabled="loading" |
|
|
|
@click="newServer"> |
|
|
|
<template #icon> |
|
|
|
<span v-if="loading" class="icon icon-loading-small" /> |
|
|
|
<Plus v-else :size="20" /> |
|
|
|
</template> |
|
|
|
{{ t('spreed', 'Add a new recording backend server') }} |
|
|
|
</NcButton> |
|
|
|
|
|
|
|
<NcPasswordField class="form__textfield additional-top-margin" |
|
|
|
:value="secret" |
|
|
|
name="recording_secret" |
|
|
|
autocomplete="new-password" |
|
|
|
:disabled="loading" |
|
|
|
:placeholder="t('spreed', 'Shared secret')" |
|
|
|
:label="t('spreed', 'Shared secret')" |
|
|
|
label-visible |
|
|
|
@update:value="updateSecret" /> |
|
|
|
|
|
|
|
<template v-if="servers.length && recordingConsentCapability"> |
|
|
|
<h3>{{ t('spreed', 'Recording consent') }}</h3> |
|
|
|
|
|
|
|
<template v-for="level in recordingConsentOptions"> |
|
|
|
<NcCheckboxRadioSwitch :key="level.value + '_radio'" |
|
|
|
:value="level.value.toString()" |
|
|
|
:checked.sync="recordingConsentSelected" |
|
|
|
name="recording-consent" |
|
|
|
type="radio" |
|
|
|
:disabled="loading" |
|
|
|
@update:checked="setRecordingConsent"> |
|
|
|
{{ level.label }} |
|
|
|
</NcCheckboxRadioSwitch> |
|
|
|
|
|
|
|
<p :key="level.value + '_description'" class="consent-description"> |
|
|
|
{{ getRecordingConsentDescription(level.value) }} |
|
|
|
</p> |
|
|
|
<template v-else> |
|
|
|
<NcNoteCard v-if="showUploadLimitWarning" type="warning"> |
|
|
|
{{ uploadLimitWarning }} |
|
|
|
</NcNoteCard> |
|
|
|
|
|
|
|
<TransitionWrapper v-if="servers.length" |
|
|
|
name="fade" |
|
|
|
tag="ul" |
|
|
|
group> |
|
|
|
<RecordingServer v-for="(server, index) in servers" |
|
|
|
:key="`server${index}`" |
|
|
|
:server.sync="servers[index].server" |
|
|
|
:verify.sync="servers[index].verify" |
|
|
|
:index="index" |
|
|
|
:loading="loading" |
|
|
|
@remove-server="removeServer" |
|
|
|
@update:server="debounceUpdateServers" |
|
|
|
@update:verify="debounceUpdateServers" /> |
|
|
|
</TransitionWrapper> |
|
|
|
|
|
|
|
<NcButton v-else |
|
|
|
class="additional-top-margin" |
|
|
|
:disabled="loading" |
|
|
|
@click="newServer"> |
|
|
|
<template #icon> |
|
|
|
<span v-if="loading" class="icon icon-loading-small" /> |
|
|
|
<Plus v-else :size="20" /> |
|
|
|
</template> |
|
|
|
{{ t('spreed', 'Add a new recording backend server') }} |
|
|
|
</NcButton> |
|
|
|
|
|
|
|
<NcPasswordField class="form__textfield additional-top-margin" |
|
|
|
:value="secret" |
|
|
|
name="recording_secret" |
|
|
|
autocomplete="new-password" |
|
|
|
:disabled="loading" |
|
|
|
:placeholder="t('spreed', 'Shared secret')" |
|
|
|
:label="t('spreed', 'Shared secret')" |
|
|
|
label-visible |
|
|
|
@update:value="updateSecret" /> |
|
|
|
|
|
|
|
<template v-if="servers.length && recordingConsentCapability"> |
|
|
|
<h3>{{ t('spreed', 'Recording consent') }}</h3> |
|
|
|
|
|
|
|
<template v-for="level in recordingConsentOptions"> |
|
|
|
<NcCheckboxRadioSwitch :key="level.value + '_radio'" |
|
|
|
:value="level.value.toString()" |
|
|
|
:checked.sync="recordingConsentSelected" |
|
|
|
name="recording-consent" |
|
|
|
type="radio" |
|
|
|
:disabled="loading" |
|
|
|
@update:checked="setRecordingConsent"> |
|
|
|
{{ level.label }} |
|
|
|
</NcCheckboxRadioSwitch> |
|
|
|
|
|
|
|
<p :key="level.value + '_description'" class="consent-description"> |
|
|
|
{{ getRecordingConsentDescription(level.value) }} |
|
|
|
</p> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</section> |
|
|
|
@ -127,6 +133,7 @@ export default { |
|
|
|
uploadLimit: 0, |
|
|
|
loading: false, |
|
|
|
saved: false, |
|
|
|
showForm: true, |
|
|
|
recordingConsentSelected: loadState('spreed', 'recording_consent').toString(), |
|
|
|
debounceUpdateServers: () => {}, |
|
|
|
} |
|
|
|
@ -151,6 +158,11 @@ export default { |
|
|
|
this.uploadLimit = parseInt(state.uploadLimit, 10) |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
const signaling = loadState('spreed', 'signaling_servers') |
|
|
|
this.showForm = signaling.servers.length > 0 |
|
|
|
}, |
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
|
this.debounceUpdateServers.clear?.() |
|
|
|
}, |
|
|
|
|