From f9ea0e32119726f2103259ab47b240a361b09d00 Mon Sep 17 00:00:00 2001 From: hello_world Date: Sat, 16 May 2026 16:52:35 +0800 Subject: [PATCH 1/4] fix: improve dark theme styles for labels, buttons, and modals --- packages/gui/src/view/style/theme/dark.scss | 50 ++++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/packages/gui/src/view/style/theme/dark.scss b/packages/gui/src/view/style/theme/dark.scss index a31b81e923..8beb041fd6 100644 --- a/packages/gui/src/view/style/theme/dark.scss +++ b/packages/gui/src/view/style/theme/dark.scss @@ -21,10 +21,13 @@ $dark-input: #777; //输入框:背景色 color: $dark-text; } div, - span, - label { + span { color: $dark-text; } + label, + .ant-form-item-label > label { + color: #fff; + } .form-help { color: #a1a1a1; } @@ -169,6 +172,36 @@ $dark-input: #777; //输入框:背景色 } } + /* 大按钮(首页主开关) */ + .big-button { + > button, + > .ant-btn { + background-color: $dark-btn !important; + border-color: $dark-btn !important; + color: $dark-text !important; + &:hover { + border-color: #666 !important; + box-shadow: 0 0 8px rgba(255, 255, 255, 0.1) !important; + } + /* 激活状态 */ + &.is-active { + background-color: #1890ff !important; + border-color: #1890ff !important; + box-shadow: 0 0 12px rgba(24, 144, 255, 0.4) !important; + &:hover { + background-color: #40a9ff !important; + border-color: #40a9ff !important; + } + } + } + .switch-status-label { + color: #aaa; + &.is-active { + color: #1890ff; + } + } + } + /* 单选框:开关式 */ .ant-switch:not(.ant-switch-checked) { background-color: $dark-btn; @@ -266,4 +299,17 @@ $dark-input: #777; //输入框:背景色 color: #000; } } + + /* 确认弹窗 */ + .ant-modal-confirm { + .ant-modal-content { + background-color: $dark-bg; + } + .ant-modal-confirm-title { + color: $dark-text; + } + .ant-modal-confirm-content { + color: $dark-text; + } + } } From b02a7eae54ef2199fc1e48688fa3d39f2166b1de Mon Sep 17 00:00:00 2001 From: hello_world Date: Sun, 17 May 2026 08:30:37 +0800 Subject: [PATCH 2/4] fix: icon --- packages/gui/src/view/App.vue | 20 +++++++++++++++++-- .../gui/src/view/pages/plugin/free-eye.vue | 6 ++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/gui/src/view/App.vue b/packages/gui/src/view/App.vue index de21789538..8507ff459f 100644 --- a/packages/gui/src/view/App.vue +++ b/packages/gui/src/view/App.vue @@ -5,6 +5,7 @@ import * as Icons from '@ant-design/icons-vue'; import { ipcRenderer } from 'electron' import createMenus from '@/view/router/menu' import zhCN from 'ant-design-vue/es/locale/zh_CN' +import { theme } from 'ant-design-vue' import { colorTheme } from './composables/theme' export default { @@ -38,6 +39,21 @@ export default { theme() { return colorTheme.value }, + themeConfig() { + const isDark = this.theme === 'dark' + return { + algorithm: isDark ? theme.darkAlgorithm : theme.defaultAlgorithm, + token: isDark + ? { + colorBgBase: '#1e1f22', + colorTextBase: '#dddddd', + + colorBgContainer: '#1e1f22', + + } + : undefined, + } + }, // 将菜单数据转换为 items 格式 menuItems() { return (this.menus || []).map(item => { @@ -258,10 +274,10 @@ export default {