diff --git a/CLAUDE.md b/CLAUDE.md index 1cfc94c..8e9bf53 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,10 +7,11 @@ > **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.6 (Gerichte 4a) — Arbeitspakete 1 und 2 fertig: Anmeldung mit Passkeys, -> Datenmodell (24 Tabellen, E-0007/E-0008), Test mit zwei Haushalten, Sicherung nach -> `/app/data`. Als Nächstes Arbeitspaket 3, Seed (`docs/PROJEKTSTART.md`). -> **Letzte Aktualisierung:** 6. November 2026 +> **Status:** 26.11.14 — 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. Offen sind V2 (Preise, Bons, Kosten im Plan) und der Magic Link. +> **Letzte Aktualisierung:** 7. November 2026 Diese Datei ist das Gedächtnis jeder Sitzung. Entscheidungen stehen in `docs/entscheidungen.md` und gelten vor dem Konzept. Bei Unsicherheit: stoppen @@ -264,6 +265,18 @@ Vorlagen ersetzt. `tests/seed.test.ts` prüft die Dateien. Ein Haushalt für Gekochtes der letzten drei Tage; der Koch sieht Dankeschöns, Daumen und Sätze. - Bewertungen fließen über `dish_popularity` in den nächsten Vorschlag. +## Web-App (Arbeitspaket 9) + +- Manifest (`app/manifest.ts`) mit `id`, Sprache, Kurzbefehlen (Wünschen, Plan, + Einkauf) und maskierbarem Symbol. Service Worker aus `app/sw.ts` (Serwist): Seiten + zuerst aus dem Netz, sonst aus dem Cache; was nie offen war, zeigt `/offline` + (vorab gespeichert, `additionalPrecacheEntries` in `next.config.ts`). +- **Abmelden leert die Caches** (`lib/clear-caches.ts`, auch „Wechseln“ am + Kindergerät): Gespeicherte Seiten gehören der Person, die geht. +- Installationshinweis (`components/install-hint.tsx`): `beforeinstallprompt` wo es + ihn gibt, am iPhone der Weg über „Teilen → Zum Home-Bildschirm“; auf „Heute“ + wegtippbar, unter „Mehr“ bleibend; installiert erscheint er nicht. + ## Kinderkonten (Arbeitspaket 5b) - **Gerät + PIN** (Kai 6.11.2026), nicht Haushaltscode + PIN: Lunch ist öffentlich diff --git a/OlaresManifest.yaml b/OlaresManifest.yaml index 7008364..4b0a772 100644 --- a/OlaresManifest.yaml +++ b/OlaresManifest.yaml @@ -21,7 +21,7 @@ metadata: title: What's cooking? description: 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.13 + version: 26.11.14 categories: - Applications @@ -61,7 +61,7 @@ permission: appData: true spec: - versionName: '26.11.13' + versionName: '26.11.14' featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png promoteImage: diff --git a/app/(app)/mehr/page.tsx b/app/(app)/mehr/page.tsx index 9f121af..1bc3ca8 100644 --- a/app/(app)/mehr/page.tsx +++ b/app/(app)/mehr/page.tsx @@ -6,6 +6,7 @@ import { LanguageSelect, SignOutButton } from "@/components/more/account-actions import { RemoveButton } from "@/components/more/remove-button"; import { requireAdult } from "@/lib/auth/session"; import { KidDevices, KidsAdmin } from "@/components/more/kids-admin"; +import { InstallHint } from "@/components/install-hint"; import { withHousehold } from "@/lib/db"; import { isLocale } from "@/lib/locale"; @@ -124,6 +125,7 @@ export default async function MorePage() { + ); diff --git a/app/(app)/page.tsx b/app/(app)/page.tsx index d359226..ba14a21 100644 --- a/app/(app)/page.tsx +++ b/app/(app)/page.tsx @@ -1,5 +1,6 @@ import { ChefHat, CookingPot, Crown, Heart } from "lucide-react"; import { RateCard } from "@/components/cooking/rate-card"; +import { InstallHint } from "@/components/install-hint"; import { pendingRatings, thanksForCook } from "@/lib/cooking"; import Link from "next/link"; import { getLocale, getTranslations } from "next-intl/server"; @@ -48,6 +49,7 @@ export default async function TodayPage() {

{t("eyebrow", { date })}

{t("greeting", { name: session.displayName })}

+ {after.toRate.map((r) => ( diff --git a/app/manifest.ts b/app/manifest.ts index 7a55168..5fb9bbb 100644 --- a/app/manifest.ts +++ b/app/manifest.ts @@ -1,9 +1,14 @@ import type { MetadataRoute } from "next"; -import { getTranslations } from "next-intl/server"; +import { getLocale, getTranslations } from "next-intl/server"; export default async function manifest(): Promise { const t = await getTranslations("app"); + const nav = await getTranslations("nav"); return { + id: "/", + lang: await getLocale(), + orientation: "any", + categories: ["food", "lifestyle"], name: t("name"), short_name: t("name"), description: t("tagline"), @@ -11,6 +16,12 @@ export default async function manifest(): Promise { display: "standalone", background_color: "#fdfcfe", theme_color: "#fdfcfe", + // Lange auf das Symbol drücken: direkt zu Wünschen, Plan und Einkauf. + shortcuts: [ + { name: nav("wish"), url: "/wuenschen", icons: [{ src: "/icon-192.png", sizes: "192x192" }] }, + { name: nav("plan"), url: "/plan", icons: [{ src: "/icon-192.png", sizes: "192x192" }] }, + { name: nav("shopping"), url: "/einkauf", icons: [{ src: "/icon-192.png", sizes: "192x192" }] }, + ], icons: [ { src: "/icon-192.png", sizes: "192x192", type: "image/png" }, { src: "/icon-512.png", sizes: "512x512", type: "image/png" }, diff --git a/app/offline/page.tsx b/app/offline/page.tsx new file mode 100644 index 0000000..af9481c --- /dev/null +++ b/app/offline/page.tsx @@ -0,0 +1,17 @@ +import { CloudOff } from "lucide-react"; +import { getTranslations } from "next-intl/server"; +import { AuthShell } from "@/components/auth/auth-shell"; + +// Ohne Netz und ohne gespeicherten Stand zeigt der Service Worker diese Seite +// (app/sw.ts, fallbacks). Sie braucht keine Sitzung und keine Daten. +export default async function OfflinePage() { + const t = await getTranslations("offline"); + return ( + +

+ + {t("hint")} +

+
+ ); +} diff --git a/app/sw.ts b/app/sw.ts index 89d28b1..ab17121 100644 --- a/app/sw.ts +++ b/app/sw.ts @@ -2,8 +2,11 @@ import { defaultCache } from "@serwist/next/worker"; import type { PrecacheEntry, SerwistGlobalConfig } from "serwist"; import { Serwist } from "serwist"; -// App-Shell offline. Rezepte und die Einkaufsliste als Warteschlange kommen -// mit Arbeitspaket 7 und 8 dazu. +// Offline: Seiten, die schon einmal offen waren (etwa die Einkaufsliste), +// kommen aus dem Cache (defaultCache: zuerst Netz, dann Cache). Für alles +// andere zeigt /offline, was los ist. Haken auf der Liste wartet die +// Warteschlange im Browser ab (components/shopping/shopping-list.tsx). +// Beim Abmelden leert die App diese Caches (lib/clear-caches.ts). declare global { interface WorkerGlobalScope extends SerwistGlobalConfig { __SW_MANIFEST: (PrecacheEntry | string)[] | undefined; @@ -17,6 +20,9 @@ const serwist = new Serwist({ clientsClaim: true, navigationPreload: true, runtimeCaching: defaultCache, + fallbacks: { + entries: [{ url: "/offline", matcher: ({ request }) => request.destination === "document" }], + }, }); serwist.addEventListeners(); diff --git a/components/app-nav.tsx b/components/app-nav.tsx index 1be20dc..43ce8a4 100644 --- a/components/app-nav.tsx +++ b/components/app-nav.tsx @@ -5,6 +5,7 @@ import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { useTranslations } from "next-intl"; import { cn } from "@/lib/utils"; +import { clearCaches } from "@/lib/clear-caches"; // Untere Leiste unter dem Daumen (Leitprinzip 8). Plan und Einkauf kommen // mit ihren Arbeitspaketen dazu. @@ -57,6 +58,7 @@ export function AppNav({ child = false }: { child?: boolean }) { type="button" onClick={async () => { await fetch("/api/auth/logout", { method: "POST" }); + await clearCaches(); router.replace("/kinder"); router.refresh(); }} diff --git a/components/install-hint.tsx b/components/install-hint.tsx new file mode 100644 index 0000000..808ced0 --- /dev/null +++ b/components/install-hint.tsx @@ -0,0 +1,75 @@ +"use client"; + +import { Download, Share, X } from "lucide-react"; +import { useTranslations } from "next-intl"; +import { useEffect, useState } from "react"; +import { Button } from "@/components/ui/button"; + +type PromptEvent = Event & { prompt: () => Promise; userChoice: Promise<{ outcome: string }> }; + +const DISMISSED = "lunch_install_hint"; + +// Lunch auf den Home-Bildschirm holen. Chrome und Android bieten einen eigenen +// Dialog an (beforeinstallprompt), Safari am iPhone nicht — dort steht, wo es geht. +// Läuft die App schon installiert, erscheint nichts. `dismissible`: auf „Heute“ +// lässt sich der Hinweis wegtippen, unter „Mehr“ bleibt er. +export function InstallHint({ dismissible = false }: { dismissible?: boolean }) { + const t = useTranslations("install"); + const [prompt, setPrompt] = useState(null); + const [mode, setMode] = useState<"none" | "ios" | "prompt">("none"); + + useEffect(() => { + const standalone = window.matchMedia("(display-mode: standalone)").matches || (navigator as { standalone?: boolean }).standalone; + let gone = false; + try { + gone = dismissible && localStorage.getItem(DISMISSED) === "1"; + } catch {} + if (standalone || gone) return; + if (/iPhone|iPad|iPod/.test(navigator.userAgent)) setMode("ios"); + const onPrompt = (e: Event) => { + e.preventDefault(); + setPrompt(e as PromptEvent); + setMode("prompt"); + }; + window.addEventListener("beforeinstallprompt", onPrompt); + return () => window.removeEventListener("beforeinstallprompt", onPrompt); + }, [dismissible]); + + if (mode === "none") return null; + const dismiss = () => { + try { + localStorage.setItem(DISMISSED, "1"); + } catch {} + setMode("none"); + }; + return ( + + ); +} diff --git a/components/more/account-actions.tsx b/components/more/account-actions.tsx index 1e4ad86..5c75644 100644 --- a/components/more/account-actions.tsx +++ b/components/more/account-actions.tsx @@ -5,6 +5,7 @@ import { useRouter } from "next/navigation"; import { useTranslations } from "next-intl"; import { Button } from "@/components/ui/button"; import { LOCALES, type Locale } from "@/lib/locale"; +import { clearCaches } from "@/lib/clear-caches"; const NAMES: Record = { de: "Deutsch", en: "English", fr: "Français", es: "Español" }; @@ -42,6 +43,7 @@ export function SignOutButton() { variant="outline" onClick={async () => { await fetch("/api/auth/logout", { method: "POST" }); + await clearCaches(); router.replace("/anmelden"); }} > diff --git a/docs/PROJEKTSTART.md b/docs/PROJEKTSTART.md index 9c812c9..41f38b4 100644 --- a/docs/PROJEKTSTART.md +++ b/docs/PROJEKTSTART.md @@ -61,6 +61,7 @@ Das Repo erbt sie, weil es in der Organisation liegt. 8. **Kochmodus** mit Wake Lock und Timer, Bewertung, Dankeschön. **Erledigt** in 26.11.13 (Timer auch aus dem Schritttext, Runde endet mit dem letzten gekochten Slot). 9. **PWA-Feinschliff:** Manifest, Icons, Installationshinweis, Playwright für Wünschen, Planen, Einkaufen. + **Erledigt** in 26.11.14 (Kurzbefehle, Offline-Seite, Caches leeren beim Abmelden; Browser-Tests für jeden Ablauf von Einrichten bis Bewerten). Danach: Lunch in `aimighty/plattform` `werkzeug/apps.json` eintragen (nicht ins CI, E-0002). diff --git a/e2e/pwa.spec.ts b/e2e/pwa.spec.ts new file mode 100644 index 0000000..a7ffeed --- /dev/null +++ b/e2e/pwa.spec.ts @@ -0,0 +1,43 @@ +import { expect, test } from "@playwright/test"; + +// Web-App (Paket 9): Manifest mit Kurzbefehlen, Service Worker, offline die +// zuletzt offene Einkaufsliste, sonst die Offline-Seite; Installationshinweis. +test.describe.configure({ mode: "serial" }); + +test("the manifest names the app and offers shortcuts", async ({ request }) => { + const res = await request.get("/manifest.webmanifest"); + expect(res.ok()).toBe(true); + const m = await res.json(); + expect(m).toMatchObject({ name: "Was gibt's?", display: "standalone", start_url: "/", id: "/" }); + expect(m.shortcuts.map((s: { url: string }) => s.url)).toEqual(["/wuenschen", "/plan", "/einkauf"]); + expect(m.icons.some((i: { purpose?: string }) => i.purpose === "maskable")).toBe(true); +}); + +test("offline: the shopping list opened before still works, other pages explain", async ({ page, context }) => { + await page.goto("/"); + await page.evaluate(() => navigator.serviceWorker.ready); + await page.reload(); // jetzt steuert der Service Worker die Seite + await expect.poll(() => page.evaluate(() => !!navigator.serviceWorker.controller)).toBe(true); + await page.goto("/einkauf"); + await expect(page.getByRole("heading", { level: 1 })).toHaveText("Einkaufsliste"); + + await context.setOffline(true); + await page.reload(); + await expect(page.getByRole("heading", { level: 1 })).toHaveText("Einkaufsliste"); + const other = await context.newPage(); // die Liste hält ihre Echtzeit-Verbindung offen + await other.goto("/gerichte/neu"); + await expect(other.getByRole("heading", { level: 1 })).toHaveText("Kein Netz"); + await context.setOffline(false); +}); + +test("Today offers to put Lunch on the home screen, and the hint can be hidden", async ({ page }) => { + await page.goto("/"); + const hint = page.getByRole("complementary", { name: "Lunch auf den Home-Bildschirm" }); + await expect(hint).toContainText("Zum Home-Bildschirm"); + await hint.getByRole("button", { name: "Hinweis ausblenden" }).click(); + await expect(hint).toHaveCount(0); + await page.reload(); + await expect(page.getByRole("complementary", { name: "Lunch auf den Home-Bildschirm" })).toHaveCount(0); + await page.goto("/mehr"); + await expect(page.getByRole("complementary", { name: "Lunch auf den Home-Bildschirm" })).toBeVisible(); // unter „Mehr“ bleibt er +}); diff --git a/e2e/rundgang.spec.ts b/e2e/rundgang.spec.ts index fe137c2..7991da1 100644 --- a/e2e/rundgang.spec.ts +++ b/e2e/rundgang.spec.ts @@ -26,6 +26,7 @@ const SIGNED_OUT = [ { path: "/anmelden", heading: "Anmelden" }, { path: "/wiederherstellen", heading: "Zugang wiederherstellen" }, { path: "/kinder", heading: "Kein Kindergerät" }, + { path: "/offline", heading: "Kein Netz" }, ]; async function check(page: Page, path: string, heading: string) { @@ -104,8 +105,14 @@ test("signed in: a dish and its edit form", async ({ page }) => { test("the bottom bar never covers the last element", async ({ page }) => { await page.goto("/mehr"); - await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight)); - const last = await page.getByRole("button", { name: "Abmelden" }).boundingBox(); - const nav = await page.getByRole("navigation").boundingBox(); - expect(last && nav && last.y + last.height <= nav.y).toBe(true); + // Bis die Seite fertig ist (der Installationshinweis kommt erst nach dem Laden dazu): + // jedes Mal ganz nach unten und nachmessen. + await expect + .poll(async () => { + await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight)); + const last = await page.getByRole("button", { name: "Abmelden" }).boundingBox(); + const nav = await page.getByRole("navigation").boundingBox(); + return !!(last && nav && last.y + last.height <= nav.y); + }) + .toBe(true); }); diff --git a/lib/clear-caches.ts b/lib/clear-caches.ts new file mode 100644 index 0000000..dac7b3e --- /dev/null +++ b/lib/clear-caches.ts @@ -0,0 +1,11 @@ +// Beim Abmelden: Was der Service Worker an Seiten gespeichert hat, gehört der +// Person, die gerade geht (Einkaufsliste, Plan). Auf einem geteilten Tablet +// soll das nicht stehen bleiben. +export async function clearCaches(): Promise { + try { + if (!("caches" in window)) return; + for (const key of await caches.keys()) await caches.delete(key); + } catch { + // Kein Cache-Zugriff (privates Fenster): nichts zu tun. + } +} diff --git a/messages/de.json b/messages/de.json index 9114708..066afc7 100644 --- a/messages/de.json +++ b/messages/de.json @@ -29,7 +29,7 @@ "editPlan": "Bearbeiten", "startCooking": "Kochen", "readAlong": "Mitlesen", - "thanks": "Für {title}: {kudos, plural, one {1 Dankeschön} other {# Dankeschöns}} und {up, plural, one {1 Daumen hoch} other {# Daumen hoch}}." + "thanks": "Für {title}: {up, plural, =0 {noch kein Daumen hoch} one {1 Daumen hoch} other {# Daumen hoch}}{kudos, plural, =0 {} one { und 1 Dankeschön} other { und # Dankeschöns}}." }, "auth": { "setup": { @@ -561,5 +561,16 @@ "send": "Abschicken", "thank": "Danke an {name}", "thanked": "Danke an {name} ist angekommen" + }, + "install": { + "title": "Lunch auf den Home-Bildschirm", + "ios": "In Safari auf das Teilen-Symbol tippen, dann „Zum Home-Bildschirm“. Danach öffnet sich Lunch wie eine App.", + "install": "App installieren", + "dismiss": "Hinweis ausblenden" + }, + "offline": { + "title": "Kein Netz", + "text": "Diese Seite war noch nicht offen und ist deshalb nicht gespeichert. Sobald wieder Netz da ist, geht es weiter.", + "hint": "Die Einkaufsliste funktioniert auch ohne Netz, wenn sie vorher einmal offen war." } } diff --git a/messages/en.json b/messages/en.json index 9dfdcdf..0e2cec0 100644 --- a/messages/en.json +++ b/messages/en.json @@ -29,7 +29,7 @@ "editPlan": "Edit", "startCooking": "Cook", "readAlong": "Read along", - "thanks": "For {title}: {kudos, plural, one {1 thank-you} other {# thank-yous}} and {up, plural, one {1 thumbs up} other {# thumbs up}}." + "thanks": "For {title}: {up, plural, =0 {no thumbs up yet} one {1 thumbs up} other {# thumbs up}}{kudos, plural, =0 {} one { and 1 thank-you} other { and # thank-yous}}." }, "auth": { "setup": { @@ -561,5 +561,16 @@ "send": "Send", "thank": "Thank {name}", "thanked": "Your thanks reached {name}" + }, + "install": { + "title": "Put Lunch on your home screen", + "ios": "In Safari, tap the share icon, then “Add to Home Screen”. Lunch then opens like an app.", + "install": "Install app", + "dismiss": "Hide hint" + }, + "offline": { + "title": "No connection", + "text": "This page has not been opened before, so it is not saved. It works again as soon as you are back online.", + "hint": "The shopping list works without a connection if it was opened once before." } } diff --git a/messages/es.json b/messages/es.json index c4a1730..b97a75b 100644 --- a/messages/es.json +++ b/messages/es.json @@ -29,7 +29,7 @@ "editPlan": "Edit", "startCooking": "Cook", "readAlong": "Read along", - "thanks": "For {title}: {kudos, plural, one {1 thank-you} other {# thank-yous}} and {up, plural, one {1 thumbs up} other {# thumbs up}}." + "thanks": "For {title}: {up, plural, =0 {no thumbs up yet} one {1 thumbs up} other {# thumbs up}}{kudos, plural, =0 {} one { and 1 thank-you} other { and # thank-yous}}." }, "auth": { "setup": { @@ -561,5 +561,16 @@ "send": "Send", "thank": "Thank {name}", "thanked": "Your thanks reached {name}" + }, + "install": { + "title": "Put Lunch on your home screen", + "ios": "In Safari, tap the share icon, then “Add to Home Screen”. Lunch then opens like an app.", + "install": "Install app", + "dismiss": "Hide hint" + }, + "offline": { + "title": "No connection", + "text": "This page has not been opened before, so it is not saved. It works again as soon as you are back online.", + "hint": "The shopping list works without a connection if it was opened once before." } } diff --git a/messages/fr.json b/messages/fr.json index 2e0f853..98900b5 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -29,7 +29,7 @@ "editPlan": "Edit", "startCooking": "Cook", "readAlong": "Read along", - "thanks": "For {title}: {kudos, plural, one {1 thank-you} other {# thank-yous}} and {up, plural, one {1 thumbs up} other {# thumbs up}}." + "thanks": "For {title}: {up, plural, =0 {no thumbs up yet} one {1 thumbs up} other {# thumbs up}}{kudos, plural, =0 {} one { and 1 thank-you} other { and # thank-yous}}." }, "auth": { "setup": { @@ -561,5 +561,16 @@ "send": "Send", "thank": "Thank {name}", "thanked": "Your thanks reached {name}" + }, + "install": { + "title": "Put Lunch on your home screen", + "ios": "In Safari, tap the share icon, then “Add to Home Screen”. Lunch then opens like an app.", + "install": "Install app", + "dismiss": "Hide hint" + }, + "offline": { + "title": "No connection", + "text": "This page has not been opened before, so it is not saved. It works again as soon as you are back online.", + "hint": "The shopping list works without a connection if it was opened once before." } } diff --git a/next.config.ts b/next.config.ts index 93a4139..41b0931 100644 --- a/next.config.ts +++ b/next.config.ts @@ -9,6 +9,8 @@ const withSerwist = withSerwistInit({ swSrc: "app/sw.ts", swDest: "public/sw.js", disable: process.env.NODE_ENV !== "production", + // Die Offline-Seite liegt vorab im Cache (Fallback in app/sw.ts). + additionalPrecacheEntries: [{ url: "/offline", revision: String(Date.now()) }], }); const withNextIntl = createNextIntlPlugin("./i18n/request.ts"); diff --git a/olares/Chart.yaml b/olares/Chart.yaml index f66d847..f1a9b7c 100644 --- a/olares/Chart.yaml +++ b/olares/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: lunch description: Was gibt's? — die Familie entscheidet gemeinsam, was es gibt; aus dem Plan entsteht die Einkaufsliste type: application -version: 26.11.13 # YY.M. wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen -appVersion: "26.11.13" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran +version: 26.11.14 # YY.M. wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen +appVersion: "26.11.14" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran diff --git a/olares/OlaresManifest.yaml b/olares/OlaresManifest.yaml index 7008364..4b0a772 100644 --- a/olares/OlaresManifest.yaml +++ b/olares/OlaresManifest.yaml @@ -21,7 +21,7 @@ metadata: title: What's cooking? description: 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.13 + version: 26.11.14 categories: - Applications @@ -61,7 +61,7 @@ permission: appData: true spec: - versionName: '26.11.13' + versionName: '26.11.14' featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png promoteImage: diff --git a/olares/markt/26.11.14.md b/olares/markt/26.11.14.md new file mode 100644 index 0000000..c1b91c9 --- /dev/null +++ b/olares/markt/26.11.14.md @@ -0,0 +1,5 @@ +# Ready for the home screen +v26.11.14: Lunch is now a proper home-screen app: on the iPhone it shows how to add it via Share, elsewhere it offers to install itself, and a long press on the icon jumps straight to wishes, the plan or the shopping list. Pages opened before work without signal, anything else explains that you are offline, and signing out clears what the phone has stored. With this, all nine work packages of the first version are done. + +## Deutsch +v26.11.14: Lunch ist jetzt eine richtige App für den Home-Bildschirm: Am iPhone steht, wie es über „Teilen“ dorthin kommt, anderswo bietet es die Installation selbst an, und ein langer Druck aufs Symbol führt direkt zu Wünschen, Plan oder Einkaufsliste. Seiten, die schon offen waren, gehen auch ohne Netz, alles andere sagt, dass gerade kein Netz da ist, und Abmelden leert, was das Handy gespeichert hat. Damit sind alle neun Arbeitspakete der ersten Version fertig. diff --git a/playwright.config.ts b/playwright.config.ts index dfb66c5..9d1d2a6 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -60,22 +60,28 @@ export default defineConfig({ dependencies: ["einkauf"], use: { ...iphone, storageState: "e2e/.auth/kai.json" }, }, + { + name: "pwa", + testMatch: /pwa\.spec\.ts/, + dependencies: ["kochen"], + use: { ...iphone, storageState: "e2e/.auth/kai.json" }, + }, { name: "iphone-hell", testMatch: /rundgang\.spec\.ts/, - dependencies: ["kochen"], + dependencies: ["pwa"], use: { ...iphone, colorScheme: "light", storageState: "e2e/.auth/kai.json" }, }, { name: "iphone-dunkel", testMatch: /rundgang\.spec\.ts/, - dependencies: ["kochen"], + dependencies: ["pwa"], use: { ...iphone, colorScheme: "dark", storageState: "e2e/.auth/kai.json" }, }, { name: "desktop", testMatch: /rundgang\.spec\.ts/, - dependencies: ["kochen"], + dependencies: ["pwa"], use: { ...devices["Desktop Chrome"], viewport: { width: 1280, height: 860 }, storageState: "e2e/.auth/kai.json" }, }, ],