From 9535f49f23e65e4b72eb27da6624f3c3146bfdf2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 3 Jun 2026 11:28:10 +0800 Subject: [PATCH] fix(web): improve mobile AwoooP shell width --- apps/web/src/app/[locale]/awooop/layout.tsx | 6 +++--- apps/web/src/app/[locale]/awooop/work-items/page.tsx | 2 +- apps/web/src/components/layout/app-layout.tsx | 5 +++-- apps/web/src/components/layout/sidebar.tsx | 5 ++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/web/src/app/[locale]/awooop/layout.tsx b/apps/web/src/app/[locale]/awooop/layout.tsx index 0cfa20ff..4fcf24bf 100644 --- a/apps/web/src/app/[locale]/awooop/layout.tsx +++ b/apps/web/src/app/[locale]/awooop/layout.tsx @@ -58,8 +58,8 @@ export default function AwoooPLayout({ return ( -
-
+
+
@@ -113,7 +113,7 @@ export default function AwoooPLayout({
-
{children}
+
{children}
); diff --git a/apps/web/src/app/[locale]/awooop/work-items/page.tsx b/apps/web/src/app/[locale]/awooop/work-items/page.tsx index e0e90a7e..5097d5b6 100644 --- a/apps/web/src/app/[locale]/awooop/work-items/page.tsx +++ b/apps/web/src/app/[locale]/awooop/work-items/page.tsx @@ -4418,7 +4418,7 @@ function KnowledgeGovernancePanel({
-
+
diff --git a/apps/web/src/components/layout/app-layout.tsx b/apps/web/src/components/layout/app-layout.tsx index 69a63fda..85ed4410 100644 --- a/apps/web/src/components/layout/app-layout.tsx +++ b/apps/web/src/components/layout/app-layout.tsx @@ -120,6 +120,7 @@ export function AppLayout({ @@ -136,14 +137,14 @@ export function AppLayout({ 'relative z-10', 'pt-[68px]', 'transition-all duration-300 ease-out', - shellCollapsed ? 'ml-16' : 'ml-[224px]' + mobileShell ? 'ml-[48px]' : shellCollapsed ? 'ml-[64px]' : 'ml-[224px]' )} > {fullBleed ? ( // fullBleed: 無 p-6,children 自行控制佈局(主頁用) children ) : ( -
+
{children}
)} diff --git a/apps/web/src/components/layout/sidebar.tsx b/apps/web/src/components/layout/sidebar.tsx index 5e0cb3b5..6db347c9 100644 --- a/apps/web/src/components/layout/sidebar.tsx +++ b/apps/web/src/components/layout/sidebar.tsx @@ -45,6 +45,7 @@ import { useApprovalStore } from '@/stores/approval.store' interface SidebarProps { locale: string collapsed?: boolean + compact?: boolean onToggle?: () => void className?: string } @@ -113,6 +114,7 @@ const BOTTOM_NAV_ITEMS: NavItemConfig[] = [ export function Sidebar({ locale, collapsed = false, + compact = false, onToggle, className, }: SidebarProps) { @@ -143,6 +145,7 @@ export function Sidebar({ const isActive = (item: NavItemConfig) => ( isRouteActive(item.href) || item.aliases?.some(alias => isRouteActive(alias)) === true ) + const sidebarWidth = compact && collapsed ? 48 : collapsed ? 64 : 224 return (