diff --git a/apps/web/src/components/dashboard-shell.tsx b/apps/web/src/components/dashboard-shell.tsx index a52d923..a0147e4 100644 --- a/apps/web/src/components/dashboard-shell.tsx +++ b/apps/web/src/components/dashboard-shell.tsx @@ -1,7 +1,23 @@ import { Button } from "@minmon/ui/components/button"; +import { + Sheet, + SheetContent, + SheetHeader, + SheetTitle, + SheetTrigger, +} from "@minmon/ui/components/sheet"; import { cn } from "@minmon/ui/lib/utils"; import { Link, Outlet, useRouterState } from "@tanstack/react-router"; -import { Activity, BookText, Globe, LayoutGrid, Server, Wrench } from "lucide-react"; +import { + Activity, + BookText, + Globe, + LayoutGrid, + MenuIcon, + Server, + Wrench, +} from "lucide-react"; +import { useEffect, useState } from "react"; const dashboardLinks = [ { @@ -36,6 +52,48 @@ const dashboardLinks = [ }, ] as const; +function isActive(pathname: string, to: string): boolean { + return to === "/dashboard" + ? pathname === to + : pathname === to || pathname.startsWith(`${to}/`); +} + +function NavItems({ + pathname, + onNavigate, +}: { + pathname: string; + onNavigate?: () => void; +}) { + return ( + + ); +} + export function DashboardShell({ userName, userEmail, @@ -47,25 +105,70 @@ export function DashboardShell({ select: (state) => state.location.pathname, }); + const [mobileOpen, setMobileOpen] = useState(false); + + useEffect(() => { + setMobileOpen(false); + }, [pathname]); + return (
-

+

+ + + + + } + /> + + + + + Navigation + + + setMobileOpen(false)} + /> + + +

+ Server Management Dashboard +

+
+

Server Management Dashboard

-

Operations overview for demos and day-to-day admin tasks

+

+ Operations overview for demos and day-to-day admin tasks +

- Use this area to review monitored assets, inspect detail states, and stage CRUD forms that can connect to tRPC routers as they are added. + Use this area to review monitored assets, inspect detail + states, currently used to monitor my homelab setup.

-

Signed in as

-

{userName ?? "Administrator"}

-

{userEmail ?? "admin@minmon.local"}

+

+ Signed in as +

+

+ {userName ?? "Administrator"} +

+

+ {userEmail ?? "admin@minmon.local"} +

@@ -82,35 +185,14 @@ export function DashboardShell({
-