mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 01:06:41 +08:00
feat: add collapsible section for AI agent settings to reduce visual clutter
This commit is contained in:
@@ -191,6 +191,9 @@ const advancedDialog = ref(false)
|
||||
const savingBasic = ref(false)
|
||||
const testingLlm = ref(false)
|
||||
|
||||
// 智能助手配置项较多,默认收起以降低基础设置页的视觉占用。
|
||||
const aiAgentSettingsCollapsed = ref(true)
|
||||
|
||||
type LlmSettingsSnapshot = {
|
||||
AI_AGENT_ENABLE: boolean
|
||||
LLM_PROVIDER: string
|
||||
@@ -997,7 +1000,7 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
||||
variant="outlined"
|
||||
:class="['mt-6', isTransparentTheme ? 'ai-agent-settings-card-transparent' : 'ai-agent-settings-card']"
|
||||
>
|
||||
<VCardItem class="pb-2">
|
||||
<VCardItem class="pb-3">
|
||||
<template #prepend>
|
||||
<VAvatar color="primary" variant="tonal" size="40">
|
||||
<VIcon icon="mdi-robot-outline" />
|
||||
@@ -1009,8 +1012,27 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
||||
<VCardSubtitle>
|
||||
{{ t('setting.system.aiAgentSectionDesc') }}
|
||||
</VCardSubtitle>
|
||||
<template #append>
|
||||
<VTooltip location="top">
|
||||
<template #activator="{ props }">
|
||||
<VBtn
|
||||
v-bind="props"
|
||||
:icon="aiAgentSettingsCollapsed ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
||||
variant="text"
|
||||
color="primary"
|
||||
size="small"
|
||||
:aria-label="aiAgentSettingsCollapsed ? t('setting.about.expand') : t('setting.about.collapse')"
|
||||
@click="aiAgentSettingsCollapsed = !aiAgentSettingsCollapsed"
|
||||
/>
|
||||
</template>
|
||||
<span>{{
|
||||
aiAgentSettingsCollapsed ? t('setting.about.expand') : t('setting.about.collapse')
|
||||
}}</span>
|
||||
</VTooltip>
|
||||
</template>
|
||||
</VCardItem>
|
||||
<VCardText class="pt-2">
|
||||
<VExpandTransition>
|
||||
<VCardText v-show="!aiAgentSettingsCollapsed" class="pt-2">
|
||||
<VRow>
|
||||
<VCol cols="12" md="4">
|
||||
<VSwitch
|
||||
@@ -1440,6 +1462,7 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
||||
</VCol>
|
||||
</VRow>
|
||||
</VCardText>
|
||||
</VExpandTransition>
|
||||
</VCard>
|
||||
</VForm>
|
||||
</VCardText>
|
||||
|
||||
Reference in New Issue
Block a user