From 8e68ed3ae6fe153418600692d4027a996a1ec089 Mon Sep 17 00:00:00 2001
From: HsiangNianian <i@jyunko.cn>
Date: Wed, 14 Jan 2026 19:24:29 +0800
Subject: feat: enforce dark mode by always applying 'dark' class and attribute

---
 ui/src/App.svelte | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'ui/src/App.svelte')

diff --git a/ui/src/App.svelte b/ui/src/App.svelte
index 2160b85..1c465b1 100644
--- a/ui/src/App.svelte
+++ b/ui/src/App.svelte
@@ -38,13 +38,14 @@
   });
   
   $effect(() => {
-    if (settingsState.settings.theme === 'light') {
-        document.documentElement.classList.remove('dark');
-        document.documentElement.setAttribute('data-theme', 'light');
-    } else {
-        document.documentElement.classList.add('dark');
-        document.documentElement.setAttribute('data-theme', 'dark');
-    }
+    // ENFORCE DARK MODE: Always add 'dark' class and attribute
+    // This combined with the @variant dark in app.css ensures dark mode is always active
+    // regardless of system preference settings.
+    document.documentElement.classList.add('dark');
+    document.documentElement.setAttribute('data-theme', 'dark');
+    
+    // Ensure 'light' class is never present
+    document.documentElement.classList.remove('light');
   });
 
   onDestroy(() => {
-- 
cgit v1.2.3-70-g09d2

