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 <[email protected]>
  • Loading branch information
Antreesy authored and backportbot[bot] committed Dec 4, 2024
1 parent e1a660d commit c291f5a
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/components/AdminSettings/RecordingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,26 @@
</p>
</template>
</template>

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

<!-- FIXME hidden until transcription quality is appropriate -->
<NcCheckboxRadioSwitch v-if="false"
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 +154,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 +234,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 c291f5a

Please sign in to comment.