feat: new themes

This commit is contained in:
kunish 2023-12-01 18:54:12 +08:00
parent 441957ff46
commit 677d024e98
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
3 changed files with 32 additions and 29 deletions

View File

@ -2,35 +2,38 @@ import { ApexOptions } from 'apexcharts'
import byteSize from 'byte-size' import byteSize from 'byte-size'
export const themes = [ export const themes = [
'light',
'dark',
'cupcake',
'bumblebee',
'emerald',
'corporate',
'synthwave',
'retro',
'cyberpunk',
'valentine',
'halloween',
'garden',
'forest',
'aqua',
'lofi',
'pastel',
'fantasy',
'wireframe',
'black',
'luxury',
'dracula',
'cmyk',
'autumn',
'business',
'acid', 'acid',
'lemonade', 'aqua',
'night', 'autumn',
'black',
'bumblebee',
'business',
'cmyk',
'coffee', 'coffee',
'corporate',
'cupcake',
'cyberpunk',
'dark',
'dim',
'dracula',
'emerald',
'fantasy',
'forest',
'garden',
'halloween',
'lemonade',
'light',
'lofi',
'luxury',
'night',
'nord',
'pastel',
'retro',
'sunset',
'synthwave',
'valentine',
'winter', 'winter',
'wireframe',
] as const ] as const
export enum ROUTES { export enum ROUTES {

View File

@ -61,11 +61,11 @@ export const [autoSwitchTheme, setAutoSwitchTheme] = makePersisted(
{ name: 'autoSwitchTheme', storage: localStorage }, { name: 'autoSwitchTheme', storage: localStorage },
) )
export const [favDayTheme, setFavDayTheme] = makePersisted( export const [favDayTheme, setFavDayTheme] = makePersisted(
createSignal<(typeof themes)[number]>('lofi'), createSignal<(typeof themes)[number]>('nord'),
{ name: 'favDayTheme', storage: localStorage }, { name: 'favDayTheme', storage: localStorage },
) )
export const [favNightTheme, setFavNightTheme] = makePersisted( export const [favNightTheme, setFavNightTheme] = makePersisted(
createSignal<(typeof themes)[number]>('business'), createSignal<(typeof themes)[number]>('sunset'),
{ name: 'favNightTheme', storage: localStorage }, { name: 'favNightTheme', storage: localStorage },
) )
export const [connectionsTableSize, setConnectionsTableSize] = makePersisted( export const [connectionsTableSize, setConnectionsTableSize] = makePersisted(

View File

@ -3,6 +3,6 @@ import { createSignal } from 'solid-js'
import { themes } from '~/constants' import { themes } from '~/constants'
export const [curTheme, setCurTheme] = makePersisted( export const [curTheme, setCurTheme] = makePersisted(
createSignal<(typeof themes)[number]>('halloween'), createSignal<(typeof themes)[number]>('sunset'),
{ name: 'theme', storage: localStorage }, { name: 'theme', storage: localStorage },
) )