From 1b5f24f7965fd7c44e6d7a84ee2e41402db1000d Mon Sep 17 00:00:00 2001 From: xpltd Date: Sun, 22 Mar 2026 16:09:43 -0500 Subject: [PATCH] Fix theme: load config before theme init, prevent flash on navigation Theme init was running before config loaded, so admin theme settings were ignored (config was null). Now: init once immediately (from cookie or fallback), load config, init again with admin defaults. Theme persists correctly across all routes including /admin. --- frontend/src/App.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 9ea3a13..aaa9be0 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -13,8 +13,11 @@ const themeStore = useThemeStore() const { connect } = useSSE() onMounted(async () => { + // Apply theme from cookie immediately to prevent flash-of-wrong-theme themeStore.init() + // Then load server config and re-apply with admin defaults await configStore.loadConfig() + themeStore.init() await themeStore.loadCustomThemes() await downloadsStore.fetchJobs() connect()