perf: optimize interface color matching

This commit is contained in:
vince
2024-07-15 23:22:00 +08:00
parent b12266bb90
commit caf1fc4375
27 changed files with 270 additions and 249 deletions

View File

@@ -79,7 +79,7 @@ const defaultPreferences: Preferences = {
theme: {
builtinType: 'default',
colorDestructive: 'hsl(348 100% 61%)',
colorPrimary: 'hsl(245 82% 67%)',
colorPrimary: 'hsl(231 98% 65%)',
colorSuccess: 'hsl(144 57% 58%)',
colorWarning: 'hsl(42 84% 61%)',
mode: 'dark',

View File

@@ -31,11 +31,11 @@ const SUPPORT_LANGUAGES: Language[] = [
const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
{
color: 'hsl(245 82% 67%)',
color: 'hsl(231 98% 65%)',
type: 'default',
},
{
color: 'hsl(231 98% 65%)',
color: 'hsl(245 82% 67%)',
type: 'violet',
},
{

View File

@@ -25,7 +25,7 @@ describe('preferences', () => {
});
it('initPreferences should initialize preferences with overrides and namespace', async () => {
const overrides = { theme: { colorPrimary: 'hsl(245 82% 67%)' } };
const overrides = { theme: { colorPrimary: 'hsl(231 98% 65%)' } };
const namespace = 'testNamespace';
await preferenceManager.initPreferences({ namespace, overrides });