fix(web): improve mobile AwoooP shell width
All checks were successful
CD Pipeline / tests (push) Successful in 1m28s
Code Review / ai-code-review (push) Successful in 14s
CD Pipeline / build-and-deploy (push) Successful in 4m3s
CD Pipeline / post-deploy-checks (push) Successful in 2m36s

This commit is contained in:
Your Name
2026-06-03 11:28:10 +08:00
parent 17ae36d132
commit 9535f49f23
4 changed files with 11 additions and 7 deletions

View File

@@ -58,8 +58,8 @@ export default function AwoooPLayout({
return (
<AppLayout locale={params.locale} showBackground={false}>
<div className="min-h-[calc(100vh-116px)] w-[calc(100vw-48px)] max-w-full overflow-x-hidden border border-[#e0ddd4] bg-[#f7f5ee] md:w-full">
<div className="border-b border-[#e0ddd4] bg-[#faf9f3] px-5 py-4">
<div className="min-h-[calc(100vh-116px)] w-full max-w-full overflow-x-hidden border border-[#e0ddd4] bg-[#f7f5ee]">
<div className="border-b border-[#e0ddd4] bg-[#faf9f3] px-3 py-4 sm:px-5">
<div className="flex flex-wrap items-center justify-between gap-3">
<div className="flex items-center gap-3">
<span className="flex h-9 w-9 items-center justify-center border border-[#d8d3c7] bg-white text-[#141413]">
@@ -113,7 +113,7 @@ export default function AwoooPLayout({
</nav>
</div>
<main className="px-5 py-5">{children}</main>
<main className="px-3 py-4 sm:px-5 sm:py-5">{children}</main>
</div>
</AppLayout>
);

View File

@@ -4418,7 +4418,7 @@ function KnowledgeGovernancePanel({
</span>
</div>
</div>
<div className="mb-3 border border-[#e0ddd4] bg-white px-3 py-3 text-xs text-[#5f5b52]">
<div id="owner-review-rail" className="mb-3 scroll-mt-24 border border-[#e0ddd4] bg-white px-3 py-3 text-xs text-[#5f5b52]">
<div className="flex flex-wrap items-start justify-between gap-3">
<div className="min-w-0">
<div className="flex items-center gap-2">

View File

@@ -120,6 +120,7 @@ export function AppLayout({
<Sidebar
locale={locale}
collapsed={shellCollapsed}
compact={mobileShell}
onToggle={handleToggle}
/>
@@ -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-6children 自行控制佈局(主頁用)
children
) : (
<div className="p-6">
<div className="p-3 sm:p-4 lg:p-6">
{children}
</div>
)}

View File

@@ -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 (
<aside
@@ -156,7 +159,7 @@ export function Sidebar({
zIndex: Z_INDEX.SIDEBAR,
background: '#faf9f3',
borderRight: '0.5px solid #e0ddd4',
width: collapsed ? 64 : 224,
width: sidebarWidth,
transition: 'width 0.3s ease',
}}
>