Skip to content

Commit 470095b

Browse files
committed
Fix dark mode inconsistency across pages
Read theme preference from localStorage instead of undefined window.__settings__. This ensures all Vue app instances (navbar and page content) use the same theme.
1 parent 91ff3c8 commit 470095b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

enferno/static/js/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const config = {
4141
}
4242
},
4343
theme: {
44-
defaultTheme: window.__settings__?.dark ? 'dark' : 'light',
44+
defaultTheme: localStorage.getItem('enferno-theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'),
4545
themes: {
4646
light: {
4747
dark: false,

0 commit comments

Comments
 (0)