From be0bc55317006725c0a155162a2b604a888b6847 Mon Sep 17 00:00:00 2001 From: kunish Date: Sat, 23 Sep 2023 20:47:29 +0800 Subject: [PATCH] feat(theme): update default theme --- src/constants/index.ts | 2 +- src/signals/config.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/constants/index.ts b/src/constants/index.ts index 064c1a9..9e81b53 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -31,7 +31,7 @@ export const themes = [ 'night', 'coffee', 'winter', -] +] as const export enum ROUTES { Overview = '/overview', diff --git a/src/signals/config.ts b/src/signals/config.ts index aaf4d4c..4882138 100644 --- a/src/signals/config.ts +++ b/src/signals/config.ts @@ -10,6 +10,7 @@ import { PROXIES_ORDERING_TYPE, PROXIES_PREVIEW_TYPE, TAILWINDCSS_SIZE, + themes, } from '~/constants' import { ConnectionsTableColumnOrder, @@ -48,11 +49,11 @@ export const [autoSwitchTheme, setAutoSwitchTheme] = makePersisted( { name: 'autoSwitchTheme', storage: localStorage }, ) export const [favDayTheme, setFavDayTheme] = makePersisted( - createSignal('light'), + createSignal<(typeof themes)[number]>('lofi'), { name: 'favDayTheme', storage: localStorage }, ) export const [favNightTheme, setFavNightTheme] = makePersisted( - createSignal('night'), + createSignal<(typeof themes)[number]>('business'), { name: 'favNightTheme', storage: localStorage }, ) export const [connectionsTableSize, setConnectionsTableSize] = makePersisted(