mirror of
https://github.com/nextcloud/server.git
synced 2026-02-17 01:41:05 -05:00
Fix Admin AI settings javascript error
make sure all task types we want to display actually exist Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
ebf2422508
commit
84fa05abdc
1 changed files with 4 additions and 1 deletions
|
|
@ -38,7 +38,7 @@
|
|||
</NcSettingsSection>
|
||||
<NcSettingsSection :name="t('settings', 'Text processing')"
|
||||
:description="t('settings', 'Text processing tasks can be implemented by different apps. Here you can set which app should be used for which task.')">
|
||||
<template v-for="type in Object.keys(settings['ai.textprocessing_provider_preferences'])">
|
||||
<template v-for="type in tpTaskTypes">
|
||||
<div :key="type">
|
||||
<h3>{{ t('settings', 'Task:') }} {{ getTaskType(type).name }}</h3>
|
||||
<p>{{ getTaskType(type).description }}</p>
|
||||
|
|
@ -110,6 +110,9 @@ export default {
|
|||
hasTextProcessing() {
|
||||
return Object.keys(this.settings['ai.textprocessing_provider_preferences']).length > 0 && Array.isArray(this.textProcessingTaskTypes)
|
||||
},
|
||||
tpTaskTypes() {
|
||||
return Object.keys(this.settings['ai.textprocessing_provider_preferences']).filter(type => !!this.getTaskType(type))
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
moveUp(i) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue