diff --git a/CLAUDE.md b/CLAUDE.md index 5aabbcd..673e106 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ > **Plattform:** Olares One (Kubernetes), Repo und CI auf Gitea — kein Supabase, > kein Vercel (E-0001). Eigene Gestaltung, nicht AImighty (E-0002). > Verteilung über den Markt, Repo öffentlich (E-0005). -> **Status:** 26.11.42 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut: +> **Status:** 26.11.43 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut: > Anmeldung (Passkeys, Kinder mit Gerät + PIN), Gerichte (Link, Kochbuchfoto, AI über den > Olares Router), Wünschen, Plan, Einkaufsliste (Echtzeit, offline), Kochmodus mit > Bewertung, Web-App; Einzahl bei Stück-Mengen (26.11.15), Preise und Kosten mit Ampel @@ -21,7 +21,7 @@ > eigene Zutaten und Lieblingsprodukt je Haushalt (26.11.38, E-0015), Löffel und Gebinde > (26.11.39, E-0016), Anmelden per Mail-Link über Resend (26.11.40, E-0017; nur > anmelden, keine Geräte oder Passkeys aus einer Mail-Sitzung), Leiste bleibt nach der -> Tastatur unten (26.11.41), Icon Kochmütze mit Herz (26.11.42). Offen: Kai trägt +> Tastatur unten (26.11.41), Icon Kochmütze mit Herz (26.11.42), Fotos aus der Mediathek (26.11.43). Offen: Kai trägt > den Resend-Schlüssel unter Mehr › Mails verschicken ein. > **Letzte Aktualisierung:** 7. November 2026 diff --git a/OlaresManifest.yaml b/OlaresManifest.yaml index 69bea4f..4c258ea 100644 --- a/OlaresManifest.yaml +++ b/OlaresManifest.yaml @@ -21,7 +21,7 @@ metadata: title: foodplanhero description: Plan. Cook. Smile. The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box. icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png - version: 26.11.42 + version: 26.11.43 categories: - Applications @@ -61,7 +61,7 @@ permission: appData: true spec: - versionName: '26.11.42' + versionName: '26.11.43' featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png promoteImage: diff --git a/components/cooking/rate-card.tsx b/components/cooking/rate-card.tsx index e70bd9b..452ca3b 100644 --- a/components/cooking/rate-card.tsx +++ b/components/cooking/rate-card.tsx @@ -85,7 +85,6 @@ export function RateCard({ item }: { item: ToRate }) { ref={file} type="file" accept="image/*" - capture="environment" className="sr-only" tabIndex={-1} aria-hidden diff --git a/components/dishes/dish-actions.tsx b/components/dishes/dish-actions.tsx index f00f080..cabd4fb 100644 --- a/components/dishes/dish-actions.tsx +++ b/components/dishes/dish-actions.tsx @@ -24,19 +24,24 @@ export function PhotoButton({ const [busy, setBusy] = useState(false); const [error, setError] = useState<"photo" | "full" | null>(null); - async function upload(file: File) { + // Mehrere aus der Mediathek (26.11.43): nacheinander, bis fünf erreicht sind. + async function upload(files: File[]) { setBusy(true); setError(null); - const form = new FormData(); - form.append("photo", file); - const res = await fetch(`/api/dishes/${id}/photos`, { - method: "POST", - body: form, - }); + let failed: "photo" | "full" | null = null; + for (const file of files.slice(0, Math.max(0, 5 - count))) { + const form = new FormData(); + form.append("photo", file); + const res = await fetch(`/api/dishes/${id}/photos`, { method: "POST", body: form }).catch(() => null); + if (!res?.ok) { + failed = res && (await res.json().catch(() => ({}))).error === "full" ? "full" : "photo"; + break; + } + } setBusy(false); if (input.current) input.current.value = ""; - if (res.ok) router.refresh(); - else setError((await res.json().catch(() => ({}))).error === "full" ? "full" : "photo"); + setError(failed); + router.refresh(); } return ( @@ -45,11 +50,12 @@ export function PhotoButton({ ref={input} type="file" accept="image/*" - capture="environment" + // Ohne capture: Das iPhone bietet Fotomediathek, Kamera und Dateien an (Kai, 26.11.43). + multiple className="sr-only" tabIndex={-1} aria-hidden - onChange={(e) => e.target.files?.[0] && upload(e.target.files[0])} + onChange={(e) => e.target.files?.length && upload(Array.from(e.target.files))} />