diff --git a/packages/ui/src/components/layout/Header.tsx b/packages/ui/src/components/layout/Header.tsx index 8983849f..73d3a444 100644 --- a/packages/ui/src/components/layout/Header.tsx +++ b/packages/ui/src/components/layout/Header.tsx @@ -1401,14 +1401,14 @@ export const Header: React.FC = ({ } return { - paddingLeft: isTabletStandalonePwa + paddingLeft: isTabletStandalonePwa && !isSidebarOpen ? 'max(calc(0.75rem + var(--oc-wco-left-inset, 0px)), 5.5rem)' : 'calc(0.75rem + var(--oc-wco-left-inset, 0px))', paddingRight: 'calc(0.75rem + var(--oc-wco-right-inset, 0px))', minHeight: 'max(3rem, var(--oc-wco-titlebar-height, 0px))', height: 'max(3rem, var(--oc-wco-titlebar-height, 0px))', }; - }, [isDesktopApp, isTabletStandalonePwa, isVSCode]); + }, [isDesktopApp, isSidebarOpen, isTabletStandalonePwa, isVSCode]); const updateHeaderHeight = React.useCallback(() => { if (typeof document === 'undefined') { diff --git a/packages/ui/src/components/layout/RightSidebar.tsx b/packages/ui/src/components/layout/RightSidebar.tsx index 44098b42..40a0a847 100644 --- a/packages/ui/src/components/layout/RightSidebar.tsx +++ b/packages/ui/src/components/layout/RightSidebar.tsx @@ -3,6 +3,7 @@ import { cn } from '@/lib/utils'; import { useUIStore } from '@/stores/useUIStore'; import { useI18n } from '@/lib/i18n'; import { isDesktopShell, isVSCodeRuntime, startDesktopWindowDrag } from '@/lib/desktop'; +import { useTabletStandalonePwaRuntime } from '@/lib/device'; export const RIGHT_SIDEBAR_CONTENT_WIDTH = 420; const RIGHT_SIDEBAR_MIN_WIDTH = 400; @@ -21,6 +22,7 @@ export const RightSidebar: React.FC = ({ isOpen, children, cl const setRightSidebarWidth = useUIStore((state) => state.setRightSidebarWidth); const isDesktopApp = React.useMemo(() => isDesktopShell(), []); const isVSCode = React.useMemo(() => isVSCodeRuntime(), []); + const isTabletStandalonePwa = useTabletStandalonePwaRuntime(); const [isResizing, setIsResizing] = React.useState(false); const startXRef = React.useRef(0); const startWidthRef = React.useRef(rightSidebarWidth || 420); @@ -137,8 +139,9 @@ export const RightSidebar: React.FC = ({ isOpen, children, cl return { paddingLeft: 'calc(0.75rem + var(--oc-wco-left-inset, 0px))', paddingRight: 'calc(0.75rem + var(--oc-wco-right-inset, 0px))', + ...(isTabletStandalonePwa ? { paddingTop: 'var(--oc-safe-area-top, 0px)' } : null), }; - }, [isDesktopApp, isVSCode]); + }, [isDesktopApp, isTabletStandalonePwa, isVSCode]); return (