diff --git a/applications/web/src/components/AppBar.svelte b/applications/web/src/components/AppBar.svelte
index 003a1a9a..c04fd408 100644
--- a/applications/web/src/components/AppBar.svelte
+++ b/applications/web/src/components/AppBar.svelte
@@ -22,6 +22,8 @@
export let newFileContent: string | null = null
+ let isDarkMode = localStorage.getItem("theme") === "dark"
+
$: project,
(() => {
// log("[project]", project)
@@ -120,13 +122,15 @@
if (localStorage.getItem("theme") === "light") {
document.documentElement.classList.add("dark")
localStorage.setItem("theme", "dark")
+ isDarkMode = true
} else {
document.documentElement.classList.remove("dark")
localStorage.setItem("theme", "light")
+ isDarkMode = false
}
}}
>
- {#if document.documentElement.classList.contains("dark")}
+ {#if isDarkMode}
{:else}
diff --git a/applications/web/src/components/ToolBar.svelte b/applications/web/src/components/ToolBar.svelte
index 16be22d1..0d195ff3 100644
--- a/applications/web/src/components/ToolBar.svelte
+++ b/applications/web/src/components/ToolBar.svelte
@@ -50,7 +50,7 @@
{/each}
{:else}
{#each actions as action}
-