-
Warning:
+
+
+
Warning:
Light mode is experimental and not fully supported yet. Some UI elements may not display correctly.
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 36678e5..68b32ac 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -2,41 +2,42 @@
import Navbar from "../components/core/Navbar.astro";
import Footer from "../components/core/Footer.astro";
import InView from "../components/core/InView.astro";
+import { initTheme } from "../scripts/database/initTheme";
---
-
-
-
-
-
-
-
IEEEUCSD
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
IEEEUCSD
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/dashboard.astro b/src/pages/dashboard.astro
index 9438593..bcb5d8b 100644
--- a/src/pages/dashboard.astro
+++ b/src/pages/dashboard.astro
@@ -9,8 +9,10 @@ import { SendLog } from "../scripts/pocketbase/SendLog";
import { hasAccess, type OfficerStatus } from "../utils/roleAccess";
import { OfficerTypes } from "../schemas/pocketbase/schema";
import { initAuthSync } from "../scripts/database/initAuthSync";
+import { initTheme } from "../scripts/database/initTheme";
import ToastProvider from "../components/dashboard/universal/ToastProvider";
import FirstTimeLoginManager from "../components/dashboard/universal/FirstTimeLoginManager";
+import ThemeToggle from "../components/dashboard/universal/ThemeToggle";
const title = "Dashboard";
@@ -40,7 +42,7 @@ const components = Object.fromEntries(
---
-
+
@@ -49,6 +51,10 @@ const components = Object.fromEntries(
+
@@ -387,6 +393,7 @@ const components = Object.fromEntries(
import { hasAccess, type OfficerStatus } from "../utils/roleAccess";
import { OfficerTypes } from "../schemas/pocketbase/schema";
import { initAuthSync } from "../scripts/database/initAuthSync";
+ import { initTheme } from "../scripts/database/initTheme";
const auth = Authentication.getInstance();
const get = Get.getInstance();
@@ -397,6 +404,11 @@ const components = Object.fromEntries(
window.toast = () => {};
}
+ // Initialize theme from IndexedDB
+ initTheme().catch((err) =>
+ console.error("Error initializing theme:", err)
+ );
+
// Initialize page state
const pageLoadingState =
document.getElementById("pageLoadingState");