Skip to content

Commit

Permalink
fix(AdminSettings): provide call recording config toggles
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Dec 4, 2024
1 parent 775ed02 commit 04d45ce
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/components/AdminSettings/RecordingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,24 @@
</p>
</template>
</template>

<template v-if="servers.length">
<h3>{{ t('spreed', 'Recording transcription') }}</h3>

<NcCheckboxRadioSwitch v-model="recordingTranscriptionEnabled"
type="switch"
:disabled="loading"
@update:modelValue="setRecordingTranscription">
{{ t('spreed', 'Automatically transcribe call recordings with a transcription provider') }}
</NcCheckboxRadioSwitch>

<NcCheckboxRadioSwitch v-model="recordingSummaryEnabled"
type="switch"
:disabled="loading"
@update:modelValue="setRecordingSummary">
{{ t('spreed', 'Automatically summarize call recordings with transcription and summary providers') }}
</NcCheckboxRadioSwitch>
</template>
</template>
</section>
</template>
Expand Down Expand Up @@ -134,6 +152,8 @@ export default {
saved: false,
showForm: true,
recordingConsentSelected: loadState('spreed', 'recording_consent').toString(),
recordingTranscriptionEnabled: loadState('spreed', 'call_recording_transcription'),
recordingSummaryEnabled: loadState('spreed', 'call_recording_summary'),
debounceUpdateServers: () => {},
}
},
Expand Down Expand Up @@ -212,6 +232,24 @@ export default {
})
},

setRecordingTranscription(value) {
this.loading = true
OCP.AppConfig.setValue('spreed', 'call_recording_transcription', value ? 'yes' : 'no', {
success: () => {
this.loading = false
},
})
},

setRecordingSummary(value) {
this.loading = true
OCP.AppConfig.setValue('spreed', 'call_recording_summary', value ? 'yes' : 'no', {
success: () => {
this.loading = false
},
})
},

getRecordingConsentDescription(value) {
switch (value) {
case CONFIG.RECORDING_CONSENT.OPTIONAL:
Expand Down

0 comments on commit 04d45ce

Please sign in to comment.