File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
apps/settings/src/components Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 55 <draggable v-model =" settings['ai.translation_provider_preferences']" @change =" saveChanges" >
66 <div v-for =" (providerClass, i) in settings['ai.translation_provider_preferences']" :key =" providerClass" class =" draggable__item" >
77 <DragVerticalIcon /> <span class =" draggable__number" >{{ i + 1 }}</span > {{ translationProviders.find(p => p.class === providerClass)?.name }}
8- <NcButton aria-label =" Move up" type =" tertiary" @click =" moveUp(i)" ><template #icon ><ArrowUpIcon /></template ></NcButton >
9- <NcButton aria-label =" Move down" type =" tertiary" @click =" moveDown(i)" ><template #icon ><ArrowDownIcon /></template ></NcButton >
8+ <NcButton aria-label =" Move up" type =" tertiary" @click =" moveUp(i)" >
9+ <template #icon >
10+ <ArrowUpIcon />
11+ </template >
12+ </NcButton >
13+ <NcButton aria-label =" Move down" type =" tertiary" @click =" moveDown(i)" >
14+ <template #icon >
15+ <ArrowDownIcon />
16+ </template >
17+ </NcButton >
1018 </div >
1119 </draggable >
1220 </NcSettingsSection >
2230 {{ provider.name }}
2331 </NcCheckboxRadioSwitch >
2432 </template >
25- <template v-if =" sttProviders . length === 0 " >
33+ <template v-if =" ! hasStt " >
2634 <NcCheckboxRadioSwitch disabled type =" radio" >
2735 {{ t('settings', 'None of your currently installed apps provide Speech-To-Text functionality') }}
2836 </NcCheckboxRadioSwitch >
4957 <p >  ; </p >
5058 </div >
5159 </template >
52- <template v-if =" Object . keys ( settings [ ' ai.textprocessing_provider_preferences ' ]). length === 0 || ! Array . isArray ( textProcessingTaskTypes ) " >
60+ <template v-if =" ! hasTextProcessing " >
5361 <p >{{ t('settings', 'None of your currently installed apps provide Text processing functionality') }}</p >
5462 </template >
5563 </NcSettingsSection >
@@ -95,6 +103,14 @@ export default {
95103 settings: loadState (' settings' , ' ai-settings' ),
96104 }
97105 },
106+ computed: {
107+ hasStt () {
108+ return this .sttProviders .length > 0
109+ },
110+ hasTextProcessing () {
111+ return Object .keys (this .settings [' ai.textprocessing_provider_preferences' ]).length > 0 && Array .isArray (this .textProcessingTaskTypes )
112+ },
113+ },
98114 methods: {
99115 moveUp (i ) {
100116 this .settings [' ai.translation_provider_preferences' ].splice (
You can’t perform that action at this time.
0 commit comments