diff --git a/src/components/DarkModeSwitch/index.vue b/src/components/DarkModeSwitch/index.vue index c5991b28..780c1abc 100644 --- a/src/components/DarkModeSwitch/index.vue +++ b/src/components/DarkModeSwitch/index.vue @@ -34,6 +34,6 @@ const theneList = [ ]; const handleDarkChange = (theme: ThemeMode) => { - settingsStore.changeTheme(theme); + settingsStore.updateTheme(theme); }; diff --git a/src/composables/useOnlineCount.ts b/src/composables/useOnlineCount.ts index 086a8d75..906278c6 100644 --- a/src/composables/useOnlineCount.ts +++ b/src/composables/useOnlineCount.ts @@ -1,6 +1,5 @@ import { ref, onMounted, onUnmounted, watch, getCurrentInstance } from "vue"; import { useStomp } from "./useStomp"; -import { ElMessage } from "element-plus"; import { registerWebSocketInstance } from "@/plugins/websocket"; import { Auth } from "@/utils/auth"; diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts index 97944db1..2a863c73 100644 --- a/src/lang/package/en.ts +++ b/src/lang/package/en.ts @@ -76,5 +76,21 @@ export default { showWatermark: "Show Watermark", classicBlue: "Classic Blue", minimalWhite: "Minimal White", + copyConfig: "Copy Config", + resetConfig: "Reset Default", + copySuccess: "Configuration copied to clipboard", + resetSuccess: "Reset to default configuration", + copyDescription: + "Copy config will generate current settings code, reset will restore all settings to default", + confirmReset: "Are you sure to reset all settings to default? This operation cannot be undone.", + applyToFile: "Apply to File", + onlyCopy: "Only Copy", + leftLayout: "Left Mode", + topLayout: "Top Mode", + mixLayout: "Mix Mode", + configManagement: "Config Management", + copyConfigDescription: + "Generate current settings code and copy to clipboard, then overwrite src/settings.ts file", + resetConfigDescription: "Restore all settings to system default values", }, }; diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts index 429cc8e6..f1f9cb2e 100644 --- a/src/lang/package/zh-cn.ts +++ b/src/lang/package/zh-cn.ts @@ -79,5 +79,19 @@ export default { showWatermark: "显示水印", classicBlue: "经典蓝", minimalWhite: "极简白", + copyConfig: "复制配置", + resetConfig: "重置默认", + copySuccess: "配置已复制到剪贴板", + resetSuccess: "已重置为默认配置", + copyDescription: "复制配置将生成当前设置的代码,重置将恢复所有设置为默认值", + confirmReset: "确定要重置所有设置为默认值吗?此操作不可恢复。", + applyToFile: "应用到文件", + onlyCopy: "仅复制", + leftLayout: "左侧模式", + topLayout: "顶部模式", + mixLayout: "混合模式", + configManagement: "配置管理", + copyConfigDescription: "生成当前设置的代码并复制到剪贴板,然后覆盖 src/settings.ts 文件", + resetConfigDescription: "恢复所有设置为系统默认值", }, }; diff --git a/src/layouts/components/AppMain/index.vue b/src/layouts/components/AppMain/index.vue index 398ee216..8510dc64 100644 --- a/src/layouts/components/AppMain/index.vue +++ b/src/layouts/components/AppMain/index.vue @@ -19,7 +19,7 @@ import variables from "@/styles/variables.module.scss"; // 缓存页面集合 const cachedViews = computed(() => useTagsViewStore().cachedViews); const appMainHeight = computed(() => { - if (useSettingsStore().tagsView) { + if (useSettingsStore().showTagsView) { return `calc(100vh - ${variables["navbar-height"]} - ${variables["tags-view-height"]})`; } else { return `calc(100vh - ${variables["navbar-height"]})`; @@ -32,5 +32,19 @@ const appMainHeight = computed(() => { position: relative; overflow-y: auto; background-color: var(--el-bg-color-page); + + /* 布局切换动画优化 */ + &.animate__animated { + animation-duration: 0.4s; + animation-fill-mode: forwards; + } + + &.animate__fadeOut { + animation-timing-function: ease-in; + } + + &.animate__fadeIn { + animation-timing-function: ease-out; + } } diff --git a/src/layouts/components/Settings/index.vue b/src/layouts/components/Settings/index.vue index b5241645..2df32403 100644 --- a/src/layouts/components/Settings/index.vue +++ b/src/layouts/components/Settings/index.vue @@ -1,102 +1,167 @@ diff --git a/src/layouts/index.vue b/src/layouts/index.vue index 2c382e7b..c3524030 100644 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -1,5 +1,10 @@ + + diff --git a/src/layouts/views/BaseLayout.vue b/src/layouts/views/BaseLayout.vue index 218d57ff..3e305016 100644 --- a/src/layouts/views/BaseLayout.vue +++ b/src/layouts/views/BaseLayout.vue @@ -6,9 +6,6 @@ - - -
@@ -19,10 +16,9 @@