From fca0e5b21e13cae0eed4c416c00f4e283214355f Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Wed, 18 Mar 2026 02:32:48 +0100 Subject: [PATCH] sidebar layout change #2 --- .../app/admin-configuration/page.tsx | 8 ++--- .../app/docs/DocsSidebar.tsx | 36 ++++++++++++++----- .../autopilot-monitor-web/app/docs/layout.tsx | 2 -- .../app/sessions/[sessionId]/page.tsx | 30 ++++++++-------- .../app/settings/page.tsx | 8 ++--- .../components/Navbar.tsx | 2 +- .../components/UnifiedSidebar.tsx | 6 ++-- .../tsconfig.tsbuildinfo | 2 +- 8 files changed, 56 insertions(+), 38 deletions(-) diff --git a/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx b/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx index c9f112e8..18deeff2 100644 --- a/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx +++ b/src/Web/autopilot-monitor-web/app/admin-configuration/page.tsx @@ -267,9 +267,10 @@ export default function AdminConfigurationPage() { return (
+ {/* Header */}
-
+
- +
); diff --git a/src/Web/autopilot-monitor-web/app/docs/DocsSidebar.tsx b/src/Web/autopilot-monitor-web/app/docs/DocsSidebar.tsx index d6e29c21..b071ab9e 100644 --- a/src/Web/autopilot-monitor-web/app/docs/DocsSidebar.tsx +++ b/src/Web/autopilot-monitor-web/app/docs/DocsSidebar.tsx @@ -1,5 +1,6 @@ "use client"; +import { useRouter } from "next/navigation"; import { UnifiedSidebar, SidebarItem } from "../../components/UnifiedSidebar"; import { NAV_SECTIONS } from "./docsNavSections"; import { @@ -34,16 +35,35 @@ const docsItems: SidebarItem[] = NAV_SECTIONS.map((s) => ({ })); export function DocsSidebar({ children }: { children: React.ReactNode }) { + const router = useRouter(); + return ( -
- -
- {children} -
-

Autopilot Monitor v1.0.0

+ + {/* Page header */} +
+
+
+ +

Documentation

- -
+
+ + {/* Content */} +
+ {children} +
+

Autopilot Monitor v1.0.0

+
+
+
); } diff --git a/src/Web/autopilot-monitor-web/app/docs/layout.tsx b/src/Web/autopilot-monitor-web/app/docs/layout.tsx index f2d30037..df0f1dc0 100644 --- a/src/Web/autopilot-monitor-web/app/docs/layout.tsx +++ b/src/Web/autopilot-monitor-web/app/docs/layout.tsx @@ -1,6 +1,5 @@ import type { Metadata } from "next"; import { PublicSiteNavbar } from "../../components/PublicSiteNavbar"; -import { PublicPageHeader } from "../../components/PublicPageHeader"; import { DocsSidebar } from "./DocsSidebar"; export const metadata: Metadata = { @@ -38,7 +37,6 @@ export default function DocsLayout({ children }: { children: React.ReactNode }) return (
- {children}
); diff --git a/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx b/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx index 13908eb4..67b41865 100644 --- a/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx +++ b/src/Web/autopilot-monitor-web/app/sessions/[sessionId]/page.tsx @@ -737,9 +737,22 @@ export default function SessionDetailPage() { return (
+ { + const s: SidebarItem[] = []; + if (session) s.push({ id: "section-session-info", label: "Session Info", icon: }); + if (!isGatherRulesSession) s.push({ id: "section-device-details", label: "Device Details", icon: }); + if (!isGatherRulesSession && session) s.push({ id: "section-enrollment-progress", label: "Enrollment Progress", icon: }); + if (!isGatherRulesSession) s.push({ id: "section-analysis", label: "Analysis", icon: }); + if (!isGatherRulesSession) s.push({ id: "section-performance", label: "Performance", icon: }); + if (!isGatherRulesSession) s.push({ id: "section-scripts", label: "Script Executions", icon: }); + if (!isGatherRulesSession) s.push({ id: "section-downloads", label: "Downloads", icon: }); + if (!isGatherRulesSession) s.push({ id: "section-install-progress", label: "Install Progress", icon: }); + s.push({ id: "section-event-timeline", label: "Event Timeline", icon: }); + return s; + })()} mode="scroll-spy" title="Sections"> {/* Header */}
-
+
- { - const s: SidebarItem[] = []; - if (session) s.push({ id: "section-session-info", label: "Session Info", icon: }); - if (!isGatherRulesSession) s.push({ id: "section-device-details", label: "Device Details", icon: }); - if (!isGatherRulesSession && session) s.push({ id: "section-enrollment-progress", label: "Enrollment Progress", icon: }); - if (!isGatherRulesSession) s.push({ id: "section-analysis", label: "Analysis", icon: }); - if (!isGatherRulesSession) s.push({ id: "section-performance", label: "Performance", icon: }); - if (!isGatherRulesSession) s.push({ id: "section-scripts", label: "Script Executions", icon: }); - if (!isGatherRulesSession) s.push({ id: "section-downloads", label: "Downloads", icon: }); - if (!isGatherRulesSession) s.push({ id: "section-install-progress", label: "Install Progress", icon: }); - s.push({ id: "section-event-timeline", label: "Event Timeline", icon: }); - return s; - })()} mode="scroll-spy" title="Sections"> -
+
{/* Session Info Card */} {session && ( diff --git a/src/Web/autopilot-monitor-web/app/settings/page.tsx b/src/Web/autopilot-monitor-web/app/settings/page.tsx index 6f4c66ac..03eb573f 100644 --- a/src/Web/autopilot-monitor-web/app/settings/page.tsx +++ b/src/Web/autopilot-monitor-web/app/settings/page.tsx @@ -943,9 +943,10 @@ export default function SettingsPage() { return (
+ {/* Header */}
-
+
-
+
diff --git a/src/Web/autopilot-monitor-web/components/UnifiedSidebar.tsx b/src/Web/autopilot-monitor-web/components/UnifiedSidebar.tsx index f209b9b8..a831c599 100644 --- a/src/Web/autopilot-monitor-web/components/UnifiedSidebar.tsx +++ b/src/Web/autopilot-monitor-web/components/UnifiedSidebar.tsx @@ -22,7 +22,7 @@ interface UnifiedSidebarProps { // Sidebar pixel widths const SIDEBAR_PX: Record = { - full: 208, // w-52 + full: 224, // w-56 icons: 56, // w-14 hidden: 0, }; @@ -120,7 +120,7 @@ export function UnifiedSidebar({ const activeLabel = items.find((i) => i.id === activeId)?.label ?? title; const sidebarWidthClass: Record = { - full: "w-52", + full: "w-56", icons: "w-14", hidden: "w-0", }; @@ -318,7 +318,7 @@ export function UnifiedSidebar({ {/* ===== Desktop: chevron toggle — vertically centered at sidebar edge ===== */}