From e20d393f7639b23226115decc4d08fe52017593d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Baumg=C3=A4rtner?= Date: Tue, 16 Jan 2024 10:56:19 +0100 Subject: [PATCH] fixed dark mode --- src/components/Navigation.svelte | 4 ++-- src/routes/+layout.svelte | 11 +++++++++-- src/routes/devices/+page.svelte | 7 +++---- src/routes/settings/+page.svelte | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/components/Navigation.svelte b/src/components/Navigation.svelte index 760b302..e02f522 100644 --- a/src/components/Navigation.svelte +++ b/src/components/Navigation.svelte @@ -44,7 +44,7 @@ @apply btn-icon btn-icon-xl; } a:not(.active) { - @apply bg-transparent hover:bg-surface-100 hover:bg-opacity-30; + @apply bg-transparent hover:bg-opacity-30 hover:bg-surface-100 hover:dark:bg-surface-700; } a.active { @apply variant-filled-primary; @@ -54,7 +54,7 @@ @apply absolute -top-6 opacity-0 font-normal pointer-events-none; } a:hover p { - @apply -top-9 opacity-100; + @apply -top-10 opacity-100; } a svg { diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2950a61..639ce91 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -5,6 +5,13 @@ import Onboarding from "../components/Onboarding.svelte"; import { page } from '$app/stores'; + // persistent dark mode + import { modeUserPrefers } from '@skeletonlabs/skeleton'; + import { setModeCurrent } from '@skeletonlabs/skeleton'; + if ($modeUserPrefers == false) { + setModeCurrent(false); + } + import { Modal, getModalStore } from '@skeletonlabs/skeleton'; // import type { ModalSettings, ModalComponent, ModalStore } from '@skeletonlabs/skeleton'; import { Drawer, getDrawerStore } from '@skeletonlabs/skeleton'; @@ -26,7 +33,7 @@ - + {#if $drawerStore.id === 'edit-device'}
@@ -54,7 +61,7 @@ {:else} {/if} -
{#if online} -
+
Online
diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 895c099..ce27737 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -24,7 +24,7 @@

Dark Mode

- +