Compare commits

...
1 Commits
Author SHA1 Message Date
kai f4619d22ed 26.11.36: Startseiten mittig, saubere Umbrüche (#37)
release / which version (push) Successful in 6s
release / olares chart · sanity (push) Successful in 6s
release / app (push) Successful in 1m6s
release / tag and release (push) Successful in 2s
2026-11-07 13:47:11 +00:00
18 changed files with 65 additions and 29 deletions

No files matched your search

+1 -1
View File
@@ -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.35 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut:
> **Status:** 26.11.36 — 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
+3 -3
View File
@@ -1,5 +1,5 @@
# ============================================================================
# OlaresManifest.yaml — foodplanhero (lunch, bis 26.11.35 „Was gibt's?“)
# OlaresManifest.yaml — foodplanhero (lunch, bis 26.11.36 „Was gibt's?“)
#
# Linter-Regeln, die hier zwingend gelten (scripts/check-chart.sh):
# - metadata.name, metadata.appid, Chart.yaml.name und der Ordnername
@@ -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.35
version: 26.11.36
categories:
- Applications
@@ -61,7 +61,7 @@ permission:
appData: true
spec:
versionName: '26.11.35'
versionName: '26.11.36'
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
promoteImage:
+1 -1
View File
@@ -54,7 +54,7 @@ export async function GET(_: Request, { params }: { params: Promise<{ size: stri
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", marginTop: 28 * unit }}>
{/* eslint-disable-next-line @next/next/no-img-element -- Bildbauer, kein DOM */}
<img src={photo} width={180 * unit} height={180 * unit} style={{ borderRadius: 9999, border: `${6 * unit}px solid ${HERO}`, objectFit: "cover" }} alt="" />
<div style={{ display: "flex", fontFamily: "Caveat", fontSize: 40 * unit, color: FG, marginTop: -14 * unit, transform: "rotate(5.31deg)" }}>by {name}</div>
<div style={{ display: "flex", fontFamily: "Caveat", fontSize: 40 * unit, color: FG, marginTop: -10 * unit, transform: "rotate(5.31deg)" }}>by {name}</div>
</div>
) : null}
</div>
+4 -3
View File
@@ -1,6 +1,7 @@
import { Portrait, Slogan, Wordmark } from "@/components/brand/brand";
// Rahmen für Einrichten, Anmelden und Einladung: foodplanhero mit Slogan (seit
// Rahmen für Einrichten, Anmelden und Einladung — alles mittig, Zeilen ausgeglichen
// (text-balance, Kai 7.11.2026: kein „an.“ allein in der Zeile): foodplanhero mit Slogan (seit
// 26.11.35 statt des Symbols), wo es eins gibt Maikes Porträt, dann Titel, Text, Inhalt.
export function AuthShell({
title,
@@ -21,8 +22,8 @@ export function AuthShell({
<Slogan />
</p>
{portrait ? <Portrait src={portrait.src} name={portrait.name} size={120} className="my-2" /> : null}
<h1 className="text-4xl leading-tight">{title}</h1>
{intro ? <p className="text-muted-foreground">{intro}</p> : null}
<h1 className="text-balance text-4xl leading-tight">{title}</h1>
{intro ? <p className="mx-auto max-w-[34ch] text-balance text-muted-foreground">{intro}</p> : null}
</div>
{children}
</main>
+1 -1
View File
@@ -42,7 +42,7 @@ export function InviteForm({ token, suggestedName, askName }: { token: string; s
<Button type="submit" size="lg" disabled={busy}>
{busy ? t("working") : t("invite.submit")}
</Button>
<p className="text-sm text-muted-foreground">{t("setup.passkeyHint")}</p>
<p className="mx-auto max-w-[36ch] text-balance text-center text-sm text-muted-foreground">{t("setup.passkeyHint")}</p>
</form>
);
}
+1 -1
View File
@@ -31,7 +31,7 @@ export function LoginButton() {
<KeyRound aria-hidden />
{busy ? t("working") : t("login.submit")}
</Button>
<p className="text-sm text-muted-foreground">{t("login.noPasskey")}</p>
<p className="mx-auto max-w-[36ch] text-balance text-center text-sm text-muted-foreground">{t("login.noPasskey")}</p>
<Link href="/wiederherstellen" className="inline-flex min-h-11 items-center self-center text-sm underline underline-offset-4">
{t("login.lost")}
</Link>
+1 -1
View File
@@ -50,7 +50,7 @@ export function RecoveryForm() {
{busy ? t("working") : t("recovery.submit")}
</Button>
</form>
<p className="text-sm text-muted-foreground">{t("recovery.others")}</p>
<p className="mx-auto max-w-[36ch] text-balance text-center text-sm text-muted-foreground">{t("recovery.others")}</p>
</div>
);
}
+1 -1
View File
@@ -48,7 +48,7 @@ export function SetupForm() {
<Button type="submit" size="lg" disabled={busy}>
{busy ? t("working") : t("setup.submit")}
</Button>
<p className="text-sm text-muted-foreground">{t("setup.passkeyHint")}</p>
<p className="mx-auto max-w-[36ch] text-balance text-center text-sm text-muted-foreground">{t("setup.passkeyHint")}</p>
</form>
);
}
+1 -1
View File
@@ -34,7 +34,7 @@ export function Portrait({ src, name, size = 128, className }: { src: string; na
<figure className={cn("relative mx-auto flex flex-col items-center", className)} style={{ width: size }}>
{/* eslint-disable-next-line @next/next/no-img-element -- eigenes Foto von der Box */}
<img src={src} alt={name} width={size} height={size} className="aspect-square w-full rounded-full border-4 border-hero object-cover" />
<figcaption className="-mt-4 rotate-[5.31deg] font-hand text-3xl leading-none text-foreground">by {name}</figcaption>
<figcaption className="-mt-3 rotate-[5.31deg] font-hand text-3xl leading-none text-foreground">by {name}</figcaption>
</figure>
);
}
+12 -1
View File
@@ -85,7 +85,13 @@ export function WishBoard({
for (const e of entries) map.set(e.dishId, [...(map.get(e.dishId) ?? []), e]);
return map;
}, [entries]);
const mine = (id: string) => byDish.get(id)?.find((e) => e.memberId === me);
// Gerade Gespeichertes (Grund, „Ich koche das“) gilt sofort — auch wenn das Blatt
// wieder aufgeht, bevor die Seite neu geladen ist.
const [edits, setEdits] = useState<Record<string, { note: string | null; wantsToCook: boolean }>>({});
const mine = (id: string) => {
const own = byDish.get(id)?.find((e) => e.memberId === me);
return own && edits[id] ? { ...own, ...edits[id] } : own;
};
const wishers = (id: string) => (byDish.get(id) ?? []).filter((e) => !e.isVeto);
const vetoes = (id: string) => (byDish.get(id) ?? []).filter((e) => e.isVeto);
const mineOf = (id: string) => (byDish.get(id) ?? []).filter((e) => e.isMine);
@@ -105,6 +111,7 @@ export function WishBoard({
setError(["noTokens", "noVetos", "noRound", "noTrial", "dish", "alternative", "protected", "repeat", "notWished"].includes(data.error) ? data.error : "unknown");
return null;
}
if (method !== "PATCH") setEdits(({ [key]: _, ...rest }) => rest); // neuer oder zurückgenommener Wunsch: Server gilt
if (method === "POST" && "vibrate" in navigator) navigator.vibrate?.(15);
router.refresh();
return data;
@@ -278,6 +285,10 @@ export function WishBoard({
busy={!!busy}
onCall={async (method, body) => {
const ok = await call(method, "/api/wishes", body, open.id);
if (ok && method === "PATCH") {
const b = body as { note: string | null; wantsToCook: boolean };
setEdits((e) => ({ ...e, [open.id]: { note: b.note, wantsToCook: b.wantsToCook } }));
}
if (ok) dialog.current?.close();
}}
onClose={() => dialog.current?.close()}
+19
View File
@@ -141,3 +141,22 @@ test("kitchen display: overview", async ({ page, browser }) => {
await page.reload();
await page.getByRole("button", { name: "Rundgang entfernen" }).click();
});
test("signed out: the sign-in page is centred and its intro has no orphan line", async ({ browser }) => {
const context = await browser.newContext({ ...test.info().project.use, storageState: undefined });
const page = await context.newPage();
await page.goto("/anmelden");
const intro = page.getByText("Melde dich mit dem Passkey");
const hint = page.getByText("Noch kein Passkey auf diesem Gerät?");
for (const el of [intro, hint]) expect(await el.evaluate((e) => getComputedStyle(e).textAlign)).toBe("center");
// Ausgeglichene Zeilen: die letzte Zeile der Einleitung ist kein einzelnes Wort.
const widths = await intro.evaluate((e) => {
const range = document.createRange();
range.selectNodeContents(e);
const lines = new Map<number, number>();
for (const r of range.getClientRects()) lines.set(Math.round(r.top), (lines.get(Math.round(r.top)) ?? 0) + r.width);
return [...lines.values()];
});
if (widths.length > 1) expect(widths.at(-1)!).toBeGreaterThan(widths[0]! / 4);
await context.close();
});
+4 -4
View File
@@ -47,7 +47,7 @@
"title": "Anmelden",
"intro": "Melde dich mit dem Passkey auf diesem Gerät an.",
"submit": "Mit Passkey anmelden",
"noPasskey": "Noch kein Passkey auf diesem Gerät? Lass dir im Haushalt unter Mehr › Gerät hinzufügen einen Link geben.",
"noPasskey": "Noch kein Passkey auf diesem Gerät? Lass dir im Haushalt unter Mehr › Gerät hinzufügen einen Link geben.",
"lost": "Zugang verloren?",
"kids": "Kinder melden sich hier an"
},
@@ -461,7 +461,7 @@
"draft": "Rezept daraus machen",
"drafting": "Macht ein Rezept daraus …",
"check": "Bitte prüf den Entwurf. Mengen stehen nur da, wo du sie gesagt hast.",
"noAi": "Dafür braucht foodplanhero ein Sprachmodell. Ein Admin richtet es unter Mehr › AI ein.",
"noAi": "Dafür braucht foodplanhero ein Sprachmodell. Ein Admin richtet es unter Mehr › AI ein.",
"errors": {
"mic": "Das Mikrofon ist nicht freigegeben. Erlaube es in den Einstellungen oder nutz das Textfeld.",
"noSpeech": "Kein Sprachmodell eingerichtet. Nutz das Textfeld.",
@@ -572,7 +572,7 @@
"deleteDigit": "Ziffer löschen",
"adults": "Erwachsene: mit Passkey anmelden",
"noDeviceTitle": "Kein Kindergerät",
"noDeviceText": "Kinder melden sich nur auf einem Gerät an, das ein Admin freigeschaltet hat. Den Link dafür gibt es unter „Mehr“ › „Kindergeräte“.",
"noDeviceText": "Kinder melden sich nur auf einem Gerät an, das ein Admin freigeschaltet hat. Den Link dafür gibt es unter „Mehr“ › „Kindergeräte“.",
"unlockTitle": "„{label}“ freischalten",
"unlockText": "Danach können sich die Kinder von {household} auf diesem Gerät mit Bild und PIN anmelden. Nur auf einem Gerät der Familie freischalten.",
"unlock": "Dieses Gerät freischalten",
@@ -968,6 +968,6 @@
"unlockTitle": "„{label}“ als Küchendisplay freischalten",
"unlockText": "Danach zeigt dieses Gerät die Rezepte und den Plan von {household} — groß, zum Ablesen beim Kochen. Ändern kann man hier nichts.",
"linkExpiredTitle": "Link abgelaufen",
"linkExpiredText": "Dieser Link gilt nicht mehr. Ein Admin kann unter „Mehr“ › „Küchendisplay“ einen neuen erstellen."
"linkExpiredText": "Dieser Link gilt nicht mehr. Ein Admin kann unter „Mehr“ › „Küchendisplay“ einen neuen erstellen."
}
}
+2 -2
View File
@@ -47,7 +47,7 @@
"title": "Sign in",
"intro": "Sign in with the passkey on this device.",
"submit": "Sign in with passkey",
"noPasskey": "No passkey on this device yet? Ask someone in your household for a link under More › Add device.",
"noPasskey": "No passkey on this device yet? Ask someone in your household for a link under More › Add device.",
"lost": "Lost access?",
"kids": "Children sign in here"
},
@@ -461,7 +461,7 @@
"draft": "Make a recipe",
"drafting": "Making a recipe …",
"check": "Please check the draft. Amounts only appear where you said them.",
"noAi": "This needs a language model. An admin sets it up under More › AI.",
"noAi": "This needs a language model. An admin sets it up under More › AI.",
"errors": {
"mic": "The microphone isn't allowed. Allow it in settings or use the text field.",
"noSpeech": "No speech model set up. Use the text field.",
+2 -2
View File
@@ -47,7 +47,7 @@
"title": "Sign in",
"intro": "Sign in with the passkey on this device.",
"submit": "Sign in with passkey",
"noPasskey": "No passkey on this device yet? Ask someone in your household for a link under More › Add device.",
"noPasskey": "No passkey on this device yet? Ask someone in your household for a link under More › Add device.",
"lost": "Lost access?",
"kids": "Children sign in here"
},
@@ -461,7 +461,7 @@
"draft": "Convertir en receta",
"drafting": "Preparando la receta …",
"check": "Revisa el borrador. Las cantidades solo aparecen donde las dijiste.",
"noAi": "Hace falta un modelo de lenguaje. Un admin lo configura en Más › AI.",
"noAi": "Hace falta un modelo de lenguaje. Un admin lo configura en Más › AI.",
"errors": {
"mic": "El micrófono no está permitido. Permítelo o usa el campo de texto.",
"noSpeech": "No hay modelo de voz. Usa el campo de texto.",
+2 -2
View File
@@ -47,7 +47,7 @@
"title": "Sign in",
"intro": "Sign in with the passkey on this device.",
"submit": "Sign in with passkey",
"noPasskey": "No passkey on this device yet? Ask someone in your household for a link under More › Add device.",
"noPasskey": "No passkey on this device yet? Ask someone in your household for a link under More › Add device.",
"lost": "Lost access?",
"kids": "Children sign in here"
},
@@ -461,7 +461,7 @@
"draft": "En faire une recette",
"drafting": "Préparation de la recette …",
"check": "Vérifie le brouillon. Les quantités n'apparaissent que là où tu les as dites.",
"noAi": "Il faut un modèle de langage. Un admin le configure dans Plus › AI.",
"noAi": "Il faut un modèle de langage. Un admin le configure dans Plus › AI.",
"errors": {
"mic": "Le micro n'est pas autorisé. Autorise-le ou utilise le champ de texte.",
"noSpeech": "Aucun modèle vocal configuré. Utilise le champ de texte.",
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: lunch
description: foodplanhero (Plan. Cook. Smile.) — die Familie entscheidet gemeinsam, was es gibt; aus dem Plan entsteht die Einkaufsliste
type: application
version: 26.11.35 # YY.M.<n> wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen
appVersion: "26.11.35" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran
version: 26.11.36 # YY.M.<n> wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen
appVersion: "26.11.36" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran
+3 -3
View File
@@ -1,5 +1,5 @@
# ============================================================================
# OlaresManifest.yaml — foodplanhero (lunch, bis 26.11.35 „Was gibt's?“)
# OlaresManifest.yaml — foodplanhero (lunch, bis 26.11.36 „Was gibt's?“)
#
# Linter-Regeln, die hier zwingend gelten (scripts/check-chart.sh):
# - metadata.name, metadata.appid, Chart.yaml.name und der Ordnername
@@ -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.35
version: 26.11.36
categories:
- Applications
@@ -61,7 +61,7 @@ permission:
appData: true
spec:
versionName: '26.11.35'
versionName: '26.11.36'
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
promoteImage:
+5
View File
@@ -0,0 +1,5 @@
# Calmer sign-in pages
v26.11.36: The sign-in, setup and invitation pages are centred throughout and their lines are balanced: no single word alone on the last line, the hint under the button sits in the middle, and menu paths such as "More › Add device" are no longer split across lines. "by Maike" sits a little lower so it covers less of the photo.
## Deutsch
v26.11.36: Anmelden, Einrichten und Einladung stehen durchgehend mittig, die Zeilen sind ausgeglichen: kein einzelnes Wort mehr allein in der letzten Zeile, der Hinweis unter dem Knopf steht in der Mitte, und Menüpfade wie „Mehr › Gerät hinzufügen“ werden nicht mehr zerrissen. „by Maike“ sitzt etwas tiefer und verdeckt weniger vom Foto.