fix: align iPad PWA window controls spacing

Adds tablet standalone PWA detection
Aligns header and sidebar action padding
Extends safe-area handling for tablet PWAs
This commit is contained in:
Bohdan Triapitsyn
2026-05-04 00:04:29 +03:00
parent fc2f4746e5
commit 581f7c34dc
5 changed files with 85 additions and 24 deletions
@@ -94,12 +94,17 @@ export function SidebarHeader(props: Props): React.ReactNode {
'select-none flex-shrink-0',
showSidebarToggle ? (avoidWindowControlsOverlay ? 'pl-[5.5rem] pr-3' : 'pl-3 pr-3') : 'px-2.5 py-1',
)}
style={showSidebarToggle && avoidWindowControlsOverlay ? { paddingTop: 'var(--oc-safe-area-top, 0px)' } : undefined}
>
{reserveHeaderActionsSpace ? (
<div
className={cn(
'flex h-auto flex-col gap-1',
showSidebarToggle ? 'min-h-[var(--oc-header-height,56px)] justify-center' : 'min-h-8',
showSidebarToggle
? avoidWindowControlsOverlay
? 'min-h-[calc(var(--oc-header-height,56px)-var(--oc-safe-area-top,0px))] justify-center'
: 'min-h-[var(--oc-header-height,56px)] justify-center'
: 'min-h-8',
)}
>
<div className="flex h-8 items-center justify-between gap-2">