diff --git a/webui/src/App.tsx b/webui/src/App.tsx
index a909ccb..44a155b 100644
--- a/webui/src/App.tsx
+++ b/webui/src/App.tsx
@@ -7,6 +7,7 @@ import SystemInfoDialog from "./components/SystemInfoDialog";
import { type CreateInstanceOptions, type Instance } from "@/types/instance";
import { useInstances } from "@/contexts/InstancesContext";
import { useAuth } from "@/contexts/AuthContext";
+import { ThemeProvider } from "@/contexts/ThemeContext";
function App() {
const { isAuthenticated, isLoading: authLoading } = useAuth();
@@ -42,44 +43,50 @@ function App() {
// Show loading spinner while checking auth
if (authLoading) {
return (
-
-
+
);
}
// Show login dialog if not authenticated
if (!isAuthenticated) {
return (
-
-
-
+
+
+
+
+
);
}
// Show main app if authenticated
return (
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
+
);
}
diff --git a/webui/src/components/Header.tsx b/webui/src/components/Header.tsx
index ed272ed..3c7e0e1 100644
--- a/webui/src/components/Header.tsx
+++ b/webui/src/components/Header.tsx
@@ -1,6 +1,7 @@
import { Button } from "@/components/ui/button";
-import { HelpCircle, LogOut } from "lucide-react";
+import { HelpCircle, LogOut, Moon, Sun } from "lucide-react";
import { useAuth } from "@/contexts/AuthContext";
+import { useTheme } from "@/contexts/ThemeContext";
interface HeaderProps {
onCreateInstance: () => void;
@@ -9,6 +10,7 @@ interface HeaderProps {
function Header({ onCreateInstance, onShowSystemInfo }: HeaderProps) {
const { logout } = useAuth();
+ const { theme, toggleTheme } = useTheme();
const handleLogout = () => {
if (confirm("Are you sure you want to logout?")) {
@@ -17,10 +19,10 @@ function Header({ onCreateInstance, onShowSystemInfo }: HeaderProps) {
};
return (
-