Switch to all themes.
This commit is contained in:
parent
9025febc4a
commit
51baa1c183
|
|
@ -2,7 +2,7 @@
|
|||
@use 'tailwindcss';
|
||||
|
||||
@plugin 'daisyui' {
|
||||
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', 'lemonade', 'night', 'coffee', 'winter', 'dim', 'nord', 'sunset',
|
||||
themes: all,
|
||||
}
|
||||
|
||||
html {
|
||||
|
|
|
|||
|
|
@ -194,12 +194,7 @@ const StorageUtils = {
|
|||
localStorage.setItem('config', JSON.stringify(config));
|
||||
},
|
||||
getTheme(): string {
|
||||
const theme = localStorage.getItem('theme') || 'auto';
|
||||
const activeTheme = (theme === 'auto') ?
|
||||
(window.matchMedia("(prefers-color-scheme: light)").matches ? 'light' : 'dark') :
|
||||
theme;
|
||||
|
||||
return activeTheme;
|
||||
return localStorage.getItem('theme') || 'auto';
|
||||
},
|
||||
setTheme(theme: string) {
|
||||
if (theme === 'auto') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue