mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
Completes the Settings polish item left open after M2. pdf/logo.ts - loadLogo(mediaId): fetches the large variant from mana-media, sniffs content-type to pick 'png' vs 'jpg', returns null on any failure so the PDF still renders without a logo - uploadLogo(file): multipart POST to /api/v1/media/upload with app=invoices, returns the new mediaId (or throws a user-facing msg) - logoPreviewUrl(mediaId): thin helper so the settings form doesn't have to know the media-URL lookup pattern Renderer wiring - loadLogo runs in the same Promise.all as font embedding so it doesn't add a serial wait - embedPng / embedJpg based on the sniffed kind; errors degrade silently - renderHeader takes a PDFImage|null and, when present, draws it top- left above the sender name, max 25mm × 45% content-width, aspect preserved, 3mm breathing room below Settings UI (SenderProfileForm) - Logo slot at the top of the Absender section: preview when set, "Ersetzen" / "Entfernen" actions; "+ Logo hochladen" drop-style button when empty - Upload persists immediately (no separate "Speichern" click for logo changes) — keeps the interaction one-handed - Accepts PNG / JPEG; invalid types rejected client-side before the network round-trip Closes one of the open items from docs/plans/invoices-module.md §M3. Next open: M8 AI-tools (create_invoice / mark_paid / list / stats). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||