From c03741df9391a28a1a6921902219dc4f90ea8c63 Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Sun, 27 Jul 2025 04:02:05 -0400 Subject: [PATCH 1/3] fix(frontend): Ensure 'Her' theme is always a light theme This commit fixes a bug where the 'Her' theme would switch to dark mode after a logout/login cycle. The issue was caused by two problems: 1. The `dark` class was being incorrectly added to the `documentElement` when the 'Her' theme was selected in `src/app.html`. 2. The `applyTheme` function in `src/lib/components/chat/Settings/General.svelte` was not explicitly setting the 'Her' theme as a light theme. This commit resolves both of these issues, ensuring that the 'Her' theme is always a light theme. --- src/app.html | 1 - src/lib/components/chat/Settings/General.svelte | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app.html b/src/app.html index 1c2b7f061c..30a0ecc067 100644 --- a/src/app.html +++ b/src/app.html @@ -56,7 +56,6 @@ document.documentElement.classList.add('light'); metaThemeColorTag.setAttribute('content', '#ffffff'); } else if (localStorage.theme === 'her') { - document.documentElement.classList.add('dark'); document.documentElement.classList.add('her'); metaThemeColorTag.setAttribute('content', '#983724'); } else { diff --git a/src/lib/components/chat/Settings/General.svelte b/src/lib/components/chat/Settings/General.svelte index 6b805c9a06..5929bf307e 100644 --- a/src/lib/components/chat/Settings/General.svelte +++ b/src/lib/components/chat/Settings/General.svelte @@ -117,7 +117,7 @@ }); const applyTheme = (_theme: string) => { - let themeToApply = _theme === 'oled-dark' ? 'dark' : _theme; + let themeToApply = _theme === 'oled-dark' ? 'dark' : _theme === 'her' ? 'light' : _theme; if (_theme === 'system') { themeToApply = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; From f1de837fefec3e284a7c69af4850affb37f8045e Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Tue, 29 Jul 2025 09:29:26 -0400 Subject: [PATCH 2/3] fix: should fix the "breaking change" --- src/app.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app.html b/src/app.html index 30a0ecc067..1c2b7f061c 100644 --- a/src/app.html +++ b/src/app.html @@ -56,6 +56,7 @@ document.documentElement.classList.add('light'); metaThemeColorTag.setAttribute('content', '#ffffff'); } else if (localStorage.theme === 'her') { + document.documentElement.classList.add('dark'); document.documentElement.classList.add('her'); metaThemeColorTag.setAttribute('content', '#983724'); } else { From 694494ad5ef3db3f200cf02c7cfbf7418369a8ba Mon Sep 17 00:00:00 2001 From: silentoplayz Date: Tue, 29 Jul 2025 09:33:17 -0400 Subject: [PATCH 3/3] Revert "fix: should fix the "breaking change"" This reverts commit f1de837fefec3e284a7c69af4850affb37f8045e. --- src/app.html | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app.html b/src/app.html index 1c2b7f061c..30a0ecc067 100644 --- a/src/app.html +++ b/src/app.html @@ -56,7 +56,6 @@ document.documentElement.classList.add('light'); metaThemeColorTag.setAttribute('content', '#ffffff'); } else if (localStorage.theme === 'her') { - document.documentElement.classList.add('dark'); document.documentElement.classList.add('her'); metaThemeColorTag.setAttribute('content', '#983724'); } else {