From ececf4cdaeedcc4baaf1753e0945ccf3245ef47c Mon Sep 17 00:00:00 2001 From: lzh Date: Fri, 19 Dec 2025 09:26:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=B8=BB=E9=A2=98=E8=89=B2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=E4=B8=AAamber?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/@core/base/typings/src/app.d.ts | 1 + packages/@core/preferences/src/config.ts | 4 ++-- packages/@core/preferences/src/constants.ts | 6 +++++- packages/effects/layouts/src/authentication/toolbar.vue | 5 ++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/@core/base/typings/src/app.d.ts b/packages/@core/base/typings/src/app.d.ts index f2b443359..346c66c15 100644 --- a/packages/@core/base/typings/src/app.d.ts +++ b/packages/@core/base/typings/src/app.d.ts @@ -18,6 +18,7 @@ type ThemeModeType = 'auto' | 'dark' | 'light'; type PreferencesButtonPositionType = 'auto' | 'fixed' | 'header'; type BuiltinThemeType = + | 'amber' | 'custom' | 'deep-blue' | 'deep-green' diff --git a/packages/@core/preferences/src/config.ts b/packages/@core/preferences/src/config.ts index 5b8d72363..9a7221e16 100644 --- a/packages/@core/preferences/src/config.ts +++ b/packages/@core/preferences/src/config.ts @@ -109,9 +109,9 @@ const defaultPreferences: Preferences = { wheelable: true, }, theme: { - builtinType: 'default', + builtinType: 'amber', colorDestructive: 'hsl(348 100% 61%)', - colorPrimary: 'hsl(212 100% 45%)', + colorPrimary: 'hsl(37 100% 52%)', colorSuccess: 'hsl(144 57% 58%)', colorWarning: 'hsl(42 84% 61%)', mode: 'dark', diff --git a/packages/@core/preferences/src/constants.ts b/packages/@core/preferences/src/constants.ts index 7ec2007d0..515388107 100644 --- a/packages/@core/preferences/src/constants.ts +++ b/packages/@core/preferences/src/constants.ts @@ -8,6 +8,10 @@ interface BuiltinThemePreset { } const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [ + { + color: 'hsl(37 100% 52%)', + type: 'amber', + }, { color: 'hsl(212 100% 45%)', type: 'default', @@ -112,7 +116,7 @@ const DEFAULT_TIME_ZONE_OPTIONS: TimezoneOption[] = [ }, ]; -export const COLOR_PRESETS = [...BUILT_IN_THEME_PRESETS].slice(0, 7); +export const COLOR_PRESETS = [...BUILT_IN_THEME_PRESETS].slice(0, 8); export { BUILT_IN_THEME_PRESETS, DEFAULT_TIME_ZONE_OPTIONS }; diff --git a/packages/effects/layouts/src/authentication/toolbar.vue b/packages/effects/layouts/src/authentication/toolbar.vue index 94d321ab0..cf0fce562 100644 --- a/packages/effects/layouts/src/authentication/toolbar.vue +++ b/packages/effects/layouts/src/authentication/toolbar.vue @@ -6,7 +6,6 @@ import { computed } from 'vue'; import { preferences } from '@vben/preferences'; import { - AuthenticationColorToggle, AuthenticationLayoutToggle, LanguageToggle, ThemeToggle, @@ -24,7 +23,7 @@ const props = withDefaults(defineProps(), { toolbarList: () => ['color', 'language', 'layout', 'theme'], }); -const showColor = computed(() => props.toolbarList.includes('color')); +// const showColor = computed(() => props.toolbarList.includes('color')); const showLayout = computed(() => props.toolbarList.includes('layout')); const showLanguage = computed(() => props.toolbarList.includes('language')); const showTheme = computed(() => props.toolbarList.includes('theme')); @@ -39,7 +38,7 @@ const showTheme = computed(() => props.toolbarList.includes('theme')); >