diff --git a/src/components/theme.tsx b/src/components/theme.tsx index 2091f9c..b2c549f 100644 --- a/src/components/theme.tsx +++ b/src/components/theme.tsx @@ -8,7 +8,7 @@ export const themeEvent = () => { export const ThemeSelection = () => { const [theme, setTheme] = createSignal( - localStorage.getItem("theme") === null ? "system" + localStorage.getItem("theme") === null ? "auto" : localStorage.theme === "dark" ? "dark" : "light", ); @@ -18,17 +18,17 @@ export const ThemeSelection = () => { document.documentElement.classList.toggle( "dark", newTheme === "dark" || - (newTheme === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches), + (newTheme === "auto" && window.matchMedia("(prefers-color-scheme: dark)").matches), ); - if (newTheme === "system") localStorage.removeItem("theme"); + if (newTheme === "auto") localStorage.removeItem("theme"); else localStorage.theme = newTheme; }; - const ThemeOption = (props: { theme: string; icon: string; label: string }) => { + const ThemeOption = (props: { theme: string; label: string }) => { return ( ); }; return ( -
+
- - - + + +
); diff --git a/src/views/settings.tsx b/src/views/settings.tsx index 1ff9d81..a97e578 100644 --- a/src/views/settings.tsx +++ b/src/views/settings.tsx @@ -6,12 +6,10 @@ export const [hideMedia, setHideMedia] = createSignal(localStorage.hideMedia === const Settings = () => { return ( -
-
- Settings -
+
+
Settings
-
+
@@ -26,20 +24,39 @@ const Settings = () => { />
-
-
- { - localStorage.hideMedia = e.currentTarget.checked; - setHideMedia(e.currentTarget.checked); +
+ +
+ +