From ed57f1c7723ebd565aebdb6cc86c56b0b0d51e37 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Mar 2026 10:42:56 +0000 Subject: [PATCH] Add mobile hamburger menu for navigation The navigation tabs (Machines, Users, Access Control, DNS, Settings) were hidden on mobile devices (< 768px) with no alternative navigation method. This adds a hamburger menu using the existing Menu component that is only visible on mobile, providing access to all navigation links on small screens. https://claude.ai/code/session_01E9a9GGxEPjEyMTRcbTrVmC --- app/layout/header.tsx | 98 ++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 28 deletions(-) diff --git a/app/layout/header.tsx b/app/layout/header.tsx index 237aeaa6..36333b62 100644 --- a/app/layout/header.tsx +++ b/app/layout/header.tsx @@ -1,4 +1,13 @@ -import { CircleQuestionMark, CircleUser, Globe, Lock, Server, Settings, Users } from "lucide-react"; +import { + CircleQuestionMark, + CircleUser, + Globe, + Lock, + Menu as MenuIcon, + Server, + Settings, + Users, +} from "lucide-react"; import { NavLink, useSubmit } from "react-router"; import Link from "~/components/link"; @@ -57,34 +66,67 @@ export default function Header({ user, access, configAvailable }: HeaderProps) {

headplane

{showTabs && ( - + + + + + + {tabs.map((tab) => { + if (!access[tab.key]) return null; + if ((tab.key === "dns" || tab.key === "settings") && !configAvailable) + return null; + + return ( + + + cn( + "flex items-center gap-x-2", + isActive ? "text-mist-900 dark:text-mist-50 font-medium" : "", + ) + } + prefetch="intent" + to={tab.to} + > + + {tab.label} + + + ); + })} + + + )}