From 4a2b72445eb66d1a7be8ba9bb278f03f0d4d86a0 Mon Sep 17 00:00:00 2001 From: AnotiaWang Date: Tue, 25 Feb 2025 17:08:37 +0800 Subject: [PATCH] style(ConfigManager): make sections collapsible --- components/ConfigManager.vue | 366 +++++++++++++++++++---------------- 1 file changed, 197 insertions(+), 169 deletions(-) diff --git a/components/ConfigManager.vue b/components/ConfigManager.vue index 2e01328..5d49f02 100644 --- a/components/ConfigManager.vue +++ b/components/ConfigManager.vue @@ -21,6 +21,19 @@ /** If loading AI models failed, use a plain input to improve UX */ const isLoadAiModelsFailed = ref(false) + const activeSections = ref(['0', '1']) + const settingSections = computed(() => [ + { + label: t('settings.ai.provider'), + icon: 'i-lucide-bot', + slot: 'ai', + }, + { + label: t('settings.webSearch.provider'), + icon: 'i-lucide-search', + slot: 'web-search', + }, + ]) const aiProviderOptions = computed(() => [ { label: t('settings.ai.providers.openaiCompatible.title'), @@ -170,183 +183,198 @@ -

{{ $t('settings.webSearch.provider') }}

- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + +