From f55f5ea449cca6d154dcd9d78bbe4a978ef19425 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 21 Mar 2026 22:42:21 +0100 Subject: [PATCH] Fix PWA safe area: navbar extends behind status bar, remove bottom black bar --- client/src/components/Layout/Navbar.jsx | 4 +++- client/src/index.css | 14 +++----------- client/src/pages/AdminPage.jsx | 2 +- client/src/pages/AtlasPage.jsx | 4 ++-- client/src/pages/DashboardPage.jsx | 2 +- client/src/pages/FilesPage.jsx | 2 +- client/src/pages/PhotosPage.jsx | 2 +- client/src/pages/SettingsPage.jsx | 2 +- client/src/pages/TripPlannerPage.jsx | 8 ++++---- client/src/pages/VacayPage.jsx | 4 ++-- 10 files changed, 19 insertions(+), 25 deletions(-) diff --git a/client/src/components/Layout/Navbar.jsx b/client/src/components/Layout/Navbar.jsx index 7c990db..4a2bc0c 100644 --- a/client/src/components/Layout/Navbar.jsx +++ b/client/src/components/Layout/Navbar.jsx @@ -56,7 +56,9 @@ export default function Navbar({ tripTitle, tripId, onBack, showBack, onShare }) borderBottom: `1px solid ${dark ? 'rgba(255,255,255,0.07)' : 'rgba(0,0,0,0.07)'}`, boxShadow: dark ? '0 1px 12px rgba(0,0,0,0.2)' : '0 1px 12px rgba(0,0,0,0.05)', touchAction: 'manipulation', - }} className="h-14 flex items-center px-4 gap-4 fixed top-0 left-0 right-0 z-[200]"> + paddingTop: 'env(safe-area-inset-top, 0px)', + height: 'var(--nav-h)', + }} className="flex items-center px-4 gap-4 fixed top-0 left-0 right-0 z-[200]"> {/* Left side */}
{showBack && ( diff --git a/client/src/index.css b/client/src/index.css index 44ad2fd..112e03f 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -3,17 +3,7 @@ @tailwind utilities; html { height: 100%; overflow: hidden; } -body { - height: 100%; - overflow: auto; - overscroll-behavior: none; - -webkit-overflow-scrolling: touch; - /* PWA safe areas (notch, home indicator) */ - padding-top: env(safe-area-inset-top); - padding-bottom: env(safe-area-inset-bottom); - padding-left: env(safe-area-inset-left); - padding-right: env(safe-area-inset-right); -} +body { height: 100%; overflow: auto; overscroll-behavior: none; -webkit-overflow-scrolling: touch; } .atlas-tooltip { background: rgba(10, 10, 20, 0.6) !important; @@ -148,6 +138,8 @@ html.dark .bg-slate-50\/60, html.dark [class*="bg-slate-50/"] { background-color /* ── Design tokens ─────────────────────────────── */ :root { + --safe-top: env(safe-area-inset-top, 0px); + --nav-h: calc(56px + var(--safe-top)); --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif; --sp-1: 4px; --sp-2: 8px; diff --git a/client/src/pages/AdminPage.jsx b/client/src/pages/AdminPage.jsx index 903a4f7..d2c1f44 100644 --- a/client/src/pages/AdminPage.jsx +++ b/client/src/pages/AdminPage.jsx @@ -209,7 +209,7 @@ export default function AdminPage() {
-
+
{/* Header */}
diff --git a/client/src/pages/AtlasPage.jsx b/client/src/pages/AtlasPage.jsx index a8e7fce..49bea8e 100644 --- a/client/src/pages/AtlasPage.jsx +++ b/client/src/pages/AtlasPage.jsx @@ -270,7 +270,7 @@ export default function AtlasPage() { return (
-
+
@@ -280,7 +280,7 @@ export default function AtlasPage() { return (
-
+
{/* Map */}
diff --git a/client/src/pages/DashboardPage.jsx b/client/src/pages/DashboardPage.jsx index ace9ff1..6c613cd 100644 --- a/client/src/pages/DashboardPage.jsx +++ b/client/src/pages/DashboardPage.jsx @@ -456,7 +456,7 @@ export default function DashboardPage() {
{demoMode && } -
+
{/* Header */} diff --git a/client/src/pages/FilesPage.jsx b/client/src/pages/FilesPage.jsx index 0653900..4fb41ca 100644 --- a/client/src/pages/FilesPage.jsx +++ b/client/src/pages/FilesPage.jsx @@ -61,7 +61,7 @@ export default function FilesPage() {
navigate(`/trips/${tripId}`)} /> -
+
navigate(`/trips/${tripId}`)} /> -
+
{/* Header */}
diff --git a/client/src/pages/SettingsPage.jsx b/client/src/pages/SettingsPage.jsx index df2c828..994793c 100644 --- a/client/src/pages/SettingsPage.jsx +++ b/client/src/pages/SettingsPage.jsx @@ -136,7 +136,7 @@ export default function SettingsPage() {
-
+

{t('settings.title')}

diff --git a/client/src/pages/TripPlannerPage.jsx b/client/src/pages/TripPlannerPage.jsx index 1c85be3..5ec42de 100644 --- a/client/src/pages/TripPlannerPage.jsx +++ b/client/src/pages/TripPlannerPage.jsx @@ -281,7 +281,7 @@ export default function TripPlannerPage() { navigate('/dashboard')} onShare={() => setShowMembersModal(true)} />