mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
polish AI admin settings UI
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
(cherry picked from commit 0ace67c762)
This commit is contained in:
parent
f95cf63895
commit
67fa798dc0
1 changed files with 20 additions and 4 deletions
|
|
@ -5,8 +5,16 @@
|
|||
<draggable v-model="settings['ai.translation_provider_preferences']" @change="saveChanges">
|
||||
<div v-for="(providerClass, i) in settings['ai.translation_provider_preferences']" :key="providerClass" class="draggable__item">
|
||||
<DragVerticalIcon /> <span class="draggable__number">{{ i + 1 }}</span> {{ translationProviders.find(p => p.class === providerClass)?.name }}
|
||||
<NcButton aria-label="Move up" type="tertiary" @click="moveUp(i)"><template #icon><ArrowUpIcon /></template></NcButton>
|
||||
<NcButton aria-label="Move down" type="tertiary" @click="moveDown(i)"><template #icon><ArrowDownIcon /></template></NcButton>
|
||||
<NcButton aria-label="Move up" type="tertiary" @click="moveUp(i)">
|
||||
<template #icon>
|
||||
<ArrowUpIcon />
|
||||
</template>
|
||||
</NcButton>
|
||||
<NcButton aria-label="Move down" type="tertiary" @click="moveDown(i)">
|
||||
<template #icon>
|
||||
<ArrowDownIcon />
|
||||
</template>
|
||||
</NcButton>
|
||||
</div>
|
||||
</draggable>
|
||||
</NcSettingsSection>
|
||||
|
|
@ -22,7 +30,7 @@
|
|||
{{ provider.name }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
</template>
|
||||
<template v-if="sttProviders.length === 0">
|
||||
<template v-if="!hasStt">
|
||||
<NcCheckboxRadioSwitch disabled type="radio">
|
||||
{{ t('settings', 'None of your currently installed apps provide Speech-To-Text functionality') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
|
|
@ -49,7 +57,7 @@
|
|||
<p> </p>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="Object.keys(settings['ai.textprocessing_provider_preferences']).length === 0 || !Array.isArray(textProcessingTaskTypes)">
|
||||
<template v-if="!hasTextProcessing">
|
||||
<p>{{ t('settings', 'None of your currently installed apps provide Text processing functionality') }}</p>
|
||||
</template>
|
||||
</NcSettingsSection>
|
||||
|
|
@ -95,6 +103,14 @@ export default {
|
|||
settings: loadState('settings', 'ai-settings'),
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hasStt() {
|
||||
return this.sttProviders.length > 0
|
||||
},
|
||||
hasTextProcessing() {
|
||||
return Object.keys(this.settings['ai.textprocessing_provider_preferences']).length > 0 && Array.isArray(this.textProcessingTaskTypes)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
moveUp(i) {
|
||||
this.settings['ai.translation_provider_preferences'].splice(
|
||||
|
|
|
|||
Loading…
Reference in a new issue