mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36: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 savingBasic = ref(false)
|
||||||
const testingLlm = ref(false)
|
const testingLlm = ref(false)
|
||||||
|
|
||||||
|
// 智能助手配置项较多,默认收起以降低基础设置页的视觉占用。
|
||||||
|
const aiAgentSettingsCollapsed = ref(true)
|
||||||
|
|
||||||
type LlmSettingsSnapshot = {
|
type LlmSettingsSnapshot = {
|
||||||
AI_AGENT_ENABLE: boolean
|
AI_AGENT_ENABLE: boolean
|
||||||
LLM_PROVIDER: string
|
LLM_PROVIDER: string
|
||||||
@@ -997,7 +1000,7 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
:class="['mt-6', isTransparentTheme ? 'ai-agent-settings-card-transparent' : 'ai-agent-settings-card']"
|
:class="['mt-6', isTransparentTheme ? 'ai-agent-settings-card-transparent' : 'ai-agent-settings-card']"
|
||||||
>
|
>
|
||||||
<VCardItem class="pb-2">
|
<VCardItem class="pb-3">
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<VAvatar color="primary" variant="tonal" size="40">
|
<VAvatar color="primary" variant="tonal" size="40">
|
||||||
<VIcon icon="mdi-robot-outline" />
|
<VIcon icon="mdi-robot-outline" />
|
||||||
@@ -1009,8 +1012,27 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
|||||||
<VCardSubtitle>
|
<VCardSubtitle>
|
||||||
{{ t('setting.system.aiAgentSectionDesc') }}
|
{{ t('setting.system.aiAgentSectionDesc') }}
|
||||||
</VCardSubtitle>
|
</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>
|
</VCardItem>
|
||||||
<VCardText class="pt-2">
|
<VExpandTransition>
|
||||||
|
<VCardText v-show="!aiAgentSettingsCollapsed" class="pt-2">
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="4">
|
<VCol cols="12" md="4">
|
||||||
<VSwitch
|
<VSwitch
|
||||||
@@ -1440,6 +1462,7 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
|
</VExpandTransition>
|
||||||
</VCard>
|
</VCard>
|
||||||
</VForm>
|
</VForm>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
|
|||||||
Reference in New Issue
Block a user