fix(web): improve mobile AwoooP shell width
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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-6,children 自行控制佈局(主頁用)
|
||||
children
|
||||
) : (
|
||||
<div className="p-6">
|
||||
<div className="p-3 sm:p-4 lg:p-6">
|
||||
{children}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -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',
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user