Skip to content

Commit

Permalink
Merge pull request #40916 from nextcloud/fix/admin-ai-settings-stable27
Browse files Browse the repository at this point in the history
[stable27] Fix/admin ai settings
  • Loading branch information
blizzz authored Nov 16, 2023
2 parents c759b95 + 6dd3fd5 commit 4fe9738
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions apps/settings/src/components/AdminAI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</NcSettingsSection>
<NcSettingsSection :title="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>
Expand Down Expand Up @@ -88,7 +88,7 @@ export default {
DragVerticalIcon,
ArrowDownIcon,
ArrowUpIcon,
NcButton
NcButton,
},
data() {
return {
Expand All @@ -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) {
Expand Down
Loading

0 comments on commit 4fe9738

Please sign in to comment.