From b09a9855c914ea6e66ed3bfee2d2bde1c94709c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20F=C3=B6rtsch?= Date: Thu, 12 Mar 2026 17:40:11 +0100 Subject: [PATCH] add tappable PWA install banner, tab bar safe area for notched devices Co-Authored-By: Claude Opus 4.6 --- index.html | 2 +- .../onboarding/components/onboarding-form.tsx | 2 +- src/routes/__root.tsx | 86 ++++++++++++++++--- 3 files changed, 78 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index b8d16d2..7b4d132 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + TherapyFinder diff --git a/src/features/onboarding/components/onboarding-form.tsx b/src/features/onboarding/components/onboarding-form.tsx index 47395da..a3d7928 100644 --- a/src/features/onboarding/components/onboarding-form.tsx +++ b/src/features/onboarding/components/onboarding-form.tsx @@ -10,7 +10,7 @@ import { dbExec } from "@/shared/hooks/use-db"; import { GKV_KASSEN } from "@/shared/lib/gkv-kassen"; import { cn } from "@/shared/lib/utils"; -function detectPlatform(): "ios" | "android" | "unknown" { +export function detectPlatform(): "ios" | "android" | "unknown" { const ua = navigator.userAgent; if (/iPad|iPhone|iPod/.test(ua)) return "ios"; if (/Android/.test(ua)) return "android"; diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 099e6e1..81527cd 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -4,9 +4,19 @@ import { Outlet, useMatchRoute, } from "@tanstack/react-router"; -import { ListChecks, Settings, Users } from "lucide-react"; -import { useMemo } from "react"; -import { isInstalledPwa } from "@/features/onboarding/components/onboarding-form"; +import { + ChevronDown, + ChevronUp, + ListChecks, + Settings, + Share, + Users, +} from "lucide-react"; +import { useMemo, useState } from "react"; +import { + detectPlatform, + isInstalledPwa, +} from "@/features/onboarding/components/onboarding-form"; export const Route = createRootRoute({ component: () => { @@ -18,17 +28,12 @@ export const Route = createRootRoute({ return (
- {!hideNav && !installed && ( -
- App nicht installiert — füge TherapyFinder zum Home-Bildschirm - hinzu, um Datenverlust zu vermeiden. -
- )} + {!hideNav && !installed && }
{!hideNav && ( -