From 282624f80149cea56f4873f6407f283b76bc86ee Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 19 Oct 2026 13:04:49 +0800 Subject: [PATCH] adopt CYBER neon-dark theme tokens Replace the Pure Ink light/dark/comic theme system with the CYBER single-theme dark palette from the reviewed prototype: OKLCH surfaces, one neon-cyan accent, and monospace-first typography. Arco components were reading colors from arco.css because no ConfigProvider was mounted, so the theme values in arco-theme.ts never took effect. Bridge CYBER into Arco through its --color-* variables in global.scss instead, and align arco-theme.ts to match. Brightness and style switches are gone: useTheme now pins dark, the comic font faces and locale keys are removed, and ThemeSwitch.vue is deleted along with its sidebar slot and display setting. --- .../hermes/settings/DisplaySettings.vue | 16 -- .../src/components/layout/AppSidebar.vue | 6 - .../src/components/layout/ThemeSwitch.vue | 59 ------ packages/client/src/composables/useTheme.ts | 87 ++------- packages/client/src/i18n/locales/en.ts | 5 - packages/client/src/i18n/locales/zh.ts | 5 - packages/client/src/main.ts | 20 +-- packages/client/src/styles/arco-theme.ts | 24 ++- packages/client/src/styles/global.scss | 155 ++++++++++------ packages/client/src/styles/variables.scss | 169 ++++++------------ tests/client/sidebar-search.test.ts | 9 - tests/client/style-system.test.ts | 26 ++- 12 files changed, 197 insertions(+), 384 deletions(-) delete mode 100644 packages/client/src/components/layout/ThemeSwitch.vue diff --git a/packages/client/src/components/hermes/settings/DisplaySettings.vue b/packages/client/src/components/hermes/settings/DisplaySettings.vue index cda6968..0bcb479 100644 --- a/packages/client/src/components/hermes/settings/DisplaySettings.vue +++ b/packages/client/src/components/hermes/settings/DisplaySettings.vue @@ -3,7 +3,6 @@ import { computed } from 'vue' import { useMessage } from '@/composables/useMessage' import { useI18n } from 'vue-i18n' import { useSettingsStore } from '@/stores/hermes/settings' -import { useTheme, type BrightnessMode } from '@/composables/useTheme' import { requestCompletionNotificationPermission, showCompletionNotification, type CompletionNotificationPermissionResult } from '@/utils/completion-notification' import { clampChatInputHeight, MAX_CHAT_INPUT_HEIGHT, MIN_CHAT_INPUT_HEIGHT } from '@/utils/chat-input-height' import SettingRow from './SettingRow.vue' @@ -11,13 +10,7 @@ import SettingRow from './SettingRow.vue' const settingsStore = useSettingsStore() const message = useMessage() const { t } = useI18n() -const { brightness, setBrightness } = useTheme() -const themeOptions = [ - { label: t('settings.display.themeLight'), value: 'light' }, - { label: t('settings.display.themeDark'), value: 'dark' }, - { label: t('settings.display.themeSystem'), value: 'system' }, -] const chatInputHeight = computed(() => clampChatInputHeight(settingsStore.display.chat_input_height)) async function save(values: Record) { @@ -29,12 +22,6 @@ async function save(values: Record) { } } -function handleThemeChange(val: string) { - const m = val as BrightnessMode - setBrightness(m) - save({ skin: m }) -} - function handleChatInputHeightChange(value: number | null) { return save({ chat_input_height: clampChatInputHeight(value) }) } @@ -90,9 +77,6 @@ async function testCompletionNotification() {