From 9e34ebc0d495ebf824aa108c7f44abeb8125045e Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Thu, 16 Jul 2026 14:57:00 +0800 Subject: [PATCH] fix(webui): harden responsive top bar layout Rebalance the mobile top bar so the page title can shrink independently while navigation and account actions keep stable touch targets. Align status and description visibility with the actual desktop breakpoint, hide only decorative content on narrow screens, and retain kiosk access on common phone widths without horizontal overflow. Add explicit title context for truncated labels and preserve the existing desktop density. --- .../webui/src/components/layout/top-bar.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/webui/src/components/layout/top-bar.tsx b/packages/webui/src/components/layout/top-bar.tsx index 500e6f8d..6585ecb2 100644 --- a/packages/webui/src/components/layout/top-bar.tsx +++ b/packages/webui/src/components/layout/top-bar.tsx @@ -48,12 +48,12 @@ export function TopBar({ ); return ( -
+
{/* Mobile-only menu trigger. On desktop there's no collapse button — the sidebar auto-expands on hover/focus, and its boundary with the content is a soft surface-tone shift, not a hard border. */} {isMobile && ( - )} @@ -66,19 +66,19 @@ export function TopBar({ animate={{ opacity: 1, x: 0 }} exit={{ opacity: 0, x: 8 }} transition={{ duration: 0.18 }} - className="flex min-w-0 items-center gap-2" + className="flex min-w-0 flex-1 items-center gap-2" > - {PageIcon && } -

{meta?.label}

- {meta?.description} + {PageIcon && } +

{meta?.label}

+ {meta?.description} -
+
{shown.has('status') && ( @@ -108,7 +108,7 @@ export function TopBar({ onClick={() => setConfirmLogout(true)} aria-label="登出" title="登出" - className="text-muted-foreground hover:text-destructive" + className="topbar-control text-muted-foreground hover:text-destructive" >