diff --git a/.env.example b/.env.example index 2e6a065..2be6f9d 100644 --- a/.env.example +++ b/.env.example @@ -2,12 +2,15 @@ # # Copy to .env and fill in. Never commit the real file. # Everything below the first block is optional: Klarbild starts, and the print -# studio works, with nothing but DATABASE_URL, SESSION_SECRET and ENCRYPTION_KEY. +# studio works, with nothing but a database, SESSION_SECRET and ENCRYPTION_KEY. # ───────────────────────────────────────────────────────────────────────────── # 1. The minimum — this is all a print-only instance needs # ───────────────────────────────────────────────────────────────────────────── +# The compose files build DATABASE_URL from DB_PASSWORD, so with Docker you set +# only the password here. Running from source, set DATABASE_URL yourself instead. +DB_PASSWORD=CHANGEME DATABASE_URL=postgres://klarbild:CHANGEME@db:5432/klarbild # Signs the session cookie. Any long random string. @@ -43,6 +46,12 @@ KLARBILD_TZ=Europe/Berlin PORT=4321 +# How many reverse proxies sit in front of this instance. The rate limiter reads +# the client address that many hops from the right of X-Forwarded-For, so a wrong +# number here lets a client either spoof its address or share someone else's +# limit. One proxy (Caddy, nginx, Traefik, Coolify) is the default. +TRUSTED_PROXIES=1 + # ───────────────────────────────────────────────────────────────────────────── # 2. First start # ───────────────────────────────────────────────────────────────────────────── @@ -111,9 +120,6 @@ S3_ACCESS_KEY= S3_SECRET_KEY= S3_FORCE_PATH_STYLE=true -# ───────────────────────────────────────────────────────────────────────────── -# 9. Optional -# ───────────────────────────────────────────────────────────────────────────── -# A webhook that gets a POST when a job finishes — for n8n and the like. - -N8N_WEBHOOK_URL= +# A webhook that fires when a job finishes — for n8n and the like — is set in the +# admin area rather than here, because it is a per-instance setting rather than a +# secret. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8234936..f552cb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '22' cache: npm # `npm ci` needs the lockfile to match package.json exactly, which is the diff --git a/.gitignore b/.gitignore index 011cf7a..c9319e4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ dist *.log uploads/ data/ +.DS_Store +coverage/ +*.tsbuildinfo diff --git a/Dockerfile b/Dockerfile index 7b994ab..1451756 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-bookworm-slim +FROM node:22-bookworm-slim WORKDIR /app ENV NODE_ENV=production PORT=4321 HOST=0.0.0.0 @@ -8,8 +8,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 make g++ ca-certificates \ && rm -rf /var/lib/apt/lists/* -COPY package.json ./ -RUN npm install --no-audit --no-fund +# The lockfile comes first and `npm ci` honours it, so the image is built from +# the exact versions CI tested — not from whatever `^` resolved to today. +COPY package.json package-lock.json ./ +RUN npm ci --no-audit --no-fund COPY . . RUN npm run build diff --git a/README.md b/README.md index a5a578c..c09e5d6 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ nothing uploaded. ```bash git clone https://github.com/tillheidrich/klarbild.git && cd klarbild -cp .env.example .env # fill in three secrets, the file says which +cp .env.example .env # four values at the top; the file says which docker compose up -d docker compose logs app # your admin password is printed here, once ``` @@ -42,7 +42,7 @@ output is a PDF laid out in millimetres, not a scaled bitmap, so 30 × 40 cm is **Sheet layout.** Put several pictures on one sheet at 100 % with crop marks: corner marks (0.25 pt, outside the trim) or continuous lines. Equal sizes snap to an exact grid; mixed sizes go through a MaxRects packer. Bleed 0–10 mm. 19 paper -formats from A6 to A2 — including A3+ and photo paper 9 × 13 to 20 × 30, Letter +formats from A6 to A1 — including A3+ and photo paper 9 × 13 to 20 × 30, Letter and Legal — or a custom sheet. **Pictures bigger than the sheet, handled three ways.** A 20 × 30 cm print on A4 @@ -149,7 +149,7 @@ the two tools worth knowing. ## Contributing [klarbild-demo.heidrich-digital.de](https://klarbild-demo.heidrich-digital.de) is the product -page; its source is [klarbild-demo](https://git.heidrich-digital.de/till/klarbild-demo). +page. Issues and pull requests are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for how the code is laid out and what the house style is. Security reports go to the diff --git a/docker-compose.full.yaml b/docker-compose.full.yaml index dc116b6..2807068 100644 --- a/docker-compose.full.yaml +++ b/docker-compose.full.yaml @@ -38,7 +38,6 @@ services: OPENROUTER_API_KEY: "${OPENROUTER_API_KEY:-}" TELEGRAM_BOT_TOKEN: "${TELEGRAM_BOT_TOKEN:-}" DELIVERY_DEFAULT_FOLDER: "${DELIVERY_DEFAULT_FOLDER:-klarbild}" - N8N_WEBHOOK_URL: "${N8N_WEBHOOK_URL:-}" # The database wins over these; they only apply until something is entered # under Admin → Email, so a fresh install can send mail straight away. diff --git a/docs/screenshots/mixed-sheet.png b/docs/screenshots/mixed-sheet.png deleted file mode 100644 index 22d338e..0000000 Binary files a/docs/screenshots/mixed-sheet.png and /dev/null differ diff --git a/docs/screenshots/sheet-preview.png b/docs/screenshots/sheet-preview.png deleted file mode 100644 index 8ef63d0..0000000 Binary files a/docs/screenshots/sheet-preview.png and /dev/null differ diff --git a/mcp/README.md b/mcp/README.md index 8de1e06..e4cb571 100644 --- a/mcp/README.md +++ b/mcp/README.md @@ -32,7 +32,7 @@ own tools) and then calls the Klarbild tools. - **process_images** — upload and process images (local paths or `data:` URLs). Give either `recipeId` (a preset) or `mode` (`each`/`compose`/`generate`) + options: `tasks` (`clean`/`cutout`/`format`/`contour`), `prompt_text`, `output_format` - (fixed, like `30x40`/`theframe`, **or custom**, `25x35` / `sticker5`), `output_ext` + (fixed, like `30x40`/`tv169`, **or custom**, `25x35` / `sticker5`), `output_ext` (`png`/`jpg`, omit = global default), `orientation`, `crop_mode`, `contour_mm`, `delivery_folder`, `delivery`. Returns the job ID. - **job_status** — query the status of a job (including finish time and error messages). diff --git a/mcp/klarbild-mcp.mjs b/mcp/klarbild-mcp.mjs index a140b8e..3080241 100644 --- a/mcp/klarbild-mcp.mjs +++ b/mcp/klarbild-mcp.mjs @@ -54,7 +54,7 @@ const TOOLS = [ tasks: { type: 'array', items: { type: 'string', enum: ['clean', 'cutout', 'format', 'contour'] }, description: 'Only for mode=each. Default: ["format"] if output_format is set.' }, prompt_text: { type: 'string', description: 'Description for compose/generate' }, - output_format: { type: 'string', description: 'Fixed: 30x40, A4, theframe, portrait916, keep … OR custom: "25x35" (=25×35 cm) or "sticker5" (=5×5 cm).' }, + output_format: { type: 'string', description: 'Fixed: 30x40, A4, tv169, portrait916, keep … OR custom: "25x35" (=25×35 cm) or "sticker5" (=5×5 cm).' }, output_ext: { type: 'string', enum: ['png', 'jpg'], description: 'File format. Omit = global default setting. JPG only without transparency.' }, orientation: { type: 'string', enum: ['portrait', 'landscape'] }, crop_mode: { type: 'string', enum: ['crop', 'extend'] }, diff --git a/migrations/004_modes_thumbs_storage_nas.sql b/migrations/004_modes_thumbs_storage_backup.sql similarity index 100% rename from migrations/004_modes_thumbs_storage_nas.sql rename to migrations/004_modes_thumbs_storage_backup.sql diff --git a/package.json b/package.json index d56cf35..c02ff86 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ ], "type": "module", "engines": { - "node": ">=20" + "node": ">=22.6" }, "scripts": { "dev": "astro dev", @@ -41,7 +41,6 @@ "@astrojs/node": "^9.1.3", "@astrojs/react": "^4.2.1", "@aws-sdk/client-s3": "^3.700.0", - "@aws-sdk/s3-request-presigner": "^3.700.0", "@fontsource/space-grotesk": "^5.1.0", "@fontsource/space-mono": "^5.1.0", "archiver": "^7.0.1", diff --git a/scripts/secret-scan.mjs b/scripts/secret-scan.mjs index 643bf20..5abb12e 100644 --- a/scripts/secret-scan.mjs +++ b/scripts/secret-scan.mjs @@ -38,9 +38,11 @@ const RULES = [ // Lines that are allowed to match: documentation of the shape of a secret, // and the example file, which is meant to show the names without the values. +// Lines that are allowed to match: documentation of the *shape* of a secret. +// Being a comment is deliberately not a free pass — a pasted `.env` fragment is +// usually commented out, and that is exactly the mistake worth catching. const ALLOW = [ - /example|placeholder|CHANGEME|your-|<[a-z]+>|openssl rand/i, - /^\s*(?:\/\/|#|--|\*)/, + /example|placeholder|CHANGEME|your-|<[a-z]+>|openssl rand|\.\.\.|xxxx/i, ]; let findings = 0; diff --git a/src/components/AdminApp.tsx b/src/components/AdminApp.tsx index 9ebf785..839f9ed 100644 --- a/src/components/AdminApp.tsx +++ b/src/components/AdminApp.tsx @@ -274,7 +274,6 @@ export default function AdminApp({ locale, dict }: { locale?: Locale; dict?: Dic
YYYY-MM-DD_HHMMSS_subject_format_shortid, for example 2026-08-20_143207_ada-badge_the-frame_a3f9.jpg. Because date and time come first, every file listing — the delivery target, the backup mirror, the file manager — sorts chronologically by itself. The short id at the end comes from the image's id: two images can no longer overwrite each other on delivery, even if you generate the same subject in the same format twice on one day. (Before 21 Aug 2026 that was different — the first image was lost in such a case. Under Admin → File names the existing library can be renamed after the fact.)": "Dateinamen sind eindeutig. Jedes Ergebnis heißt JJJJ-MM-TT_HHMMSS_motiv_format_kürzel, also z. B. 2026-08-20_143207_ada-badge_the-frame_a3f9.jpg. Weil Datum und Uhrzeit vorn stehen, sortiert jede Dateiliste — Auslieferungsziel, Spiegel, Dateimanager — von allein chronologisch. Das Kürzel am Ende stammt aus der Kennung des Bildes: zwei Bilder können sich beim Ausliefern nicht mehr überschreiben, auch wenn du am selben Tag zweimal dasselbe Motiv im selben Format erzeugst. (Vor dem 21.08.2026 war das anders — dort ging in so einem Fall das erste Bild verloren. Unter Admin → Dateinamen lässt sich die vorhandene Bibliothek nachträglich umbenennen.)",
+ "File names are unique. Every result is called YYYY-MM-DD_HHMMSS_subject_format_shortid, for example 2026-08-20_143207_ada-badge_tv169_a3f9.jpg. Because date and time come first, every file listing — the delivery target, the backup mirror, the file manager — sorts chronologically by itself. The short id at the end comes from the image's id: two images can no longer overwrite each other on delivery, even if you generate the same subject in the same format twice on one day. (Before 21 Aug 2026 that was different — the first image was lost in such a case. Under Admin → File names the existing library can be renamed after the fact.)": "Dateinamen sind eindeutig. Jedes Ergebnis heißt JJJJ-MM-TT_HHMMSS_motiv_format_kürzel, also z. B. 2026-08-20_143207_ada-badge_tv169_a3f9.jpg. Weil Datum und Uhrzeit vorn stehen, sortiert jede Dateiliste — Auslieferungsziel, Spiegel, Dateimanager — von allein chronologisch. Das Kürzel am Ende stammt aus der Kennung des Bildes: zwei Bilder können sich beim Ausliefern nicht mehr überschreiben, auch wenn du am selben Tag zweimal dasselbe Motiv im selben Format erzeugst. (Vor dem 21.08.2026 war das anders — dort ging in so einem Fall das erste Bild verloren. Unter Admin → Dateinamen lässt sich die vorhandene Bibliothek nachträglich umbenennen.)",
"Finish time in the job: the queue and the job show when it was done.": "Endzeit im Auftrag: Warteschlange und Auftrag zeigen, wann er fertig wurde.",
- "Fixed: images overwrote each other on the delivery target. Generating the same subject in the same format twice on one day — two badges, say — produced the same file name twice (2026-07-23_portrait_the-frame.png). On delivery the second image then silently replaced the first. That can no longer happen.": "Behoben: Bilder haben sich am Auslieferungsziel gegenseitig überschrieben. Wer am selben Tag zweimal dasselbe Motiv im selben Format erzeugt hat — etwa zwei Badges —, bekam zweimal denselben Dateinamen (2026-07-23_portrait_the-frame.png). Beim Ausliefern ersetzte das zweite Bild dann stillschweigend das erste. Das kann jetzt nicht mehr passieren.",
- "Fixed: print files were all called the same. Two sheets on the same day were both 2026-09-01_druckbogen.pdf — in the same folder the second overwrote the first. Now it is 2026-09-01_143207_druck-9-teile_a4_4eca.pdf: date, time to the second, what is on the sheet, the paper and a short id. The short id belongs to the history entry — so you can see which print was which file. Single images are now named after their subject.": "Behoben: Druckdateien hießen alle gleich. Zwei Bogen am selben Tag waren beide 2026-09-01_druckbogen.pdf — im selben Ordner überschrieb der zweite den ersten. Jetzt 2026-09-01_143207_druck-9-teile_a4_4eca.pdf: Datum, Uhrzeit auf die Sekunde, was auf dem Bogen liegt, das Papier und ein Kürzel. Das Kürzel gehört zum Verlaufseintrag — du siehst also, welcher Druck welche Datei war. Einzelbilder heißen jetzt nach ihrem Motiv.",
+ "Fixed: images overwrote each other on the delivery target. Generating the same subject in the same format twice on one day — two badges, say — produced the same file name twice (2026-07-23_portrait_tv169.png). On delivery the second image then silently replaced the first. That can no longer happen.": "Behoben: Bilder haben sich am Auslieferungsziel gegenseitig überschrieben. Wer am selben Tag zweimal dasselbe Motiv im selben Format erzeugt hat — etwa zwei Badges —, bekam zweimal denselben Dateinamen (2026-07-23_portrait_tv169.png). Beim Ausliefern ersetzte das zweite Bild dann stillschweigend das erste. Das kann jetzt nicht mehr passieren.",
+ "Fixed: print files were all called the same. Two sheets on the same day were both 2026-09-01_print-sheet.pdf — in the same folder the second overwrote the first. Now it is 2026-09-01_143207_print-9-pieces_a4_4eca.pdf: date, time to the second, what is on the sheet, the paper and a short id. The short id belongs to the history entry — so you can see which print was which file. Single images are now named after their subject.": "Behoben: Druckdateien hießen alle gleich. Zwei Bogen am selben Tag waren beide 2026-09-01_druckbogen.pdf — im selben Ordner überschrieb der zweite den ersten. Jetzt 2026-09-01_143207_druck-9-teile_a4_4eca.pdf: Datum, Uhrzeit auf die Sekunde, was auf dem Bogen liegt, das Papier und ein Kürzel. Das Kürzel gehört zum Verlaufseintrag — du siehst also, welcher Druck welche Datei war. Einzelbilder heißen jetzt nach ihrem Motiv.",
"Fixed: the crop showed the image distorted. The frame in the crop window did not have the target aspect ratio, which squeezed the image into it (measured: 8.3% too wide). Frame and image now both compute from the same ratio.": "Behoben: Der Zuschnitt zeigte das Bild verzerrt. Der Rahmen im Zuschnitt-Fenster hatte nicht das Ziel-Seitenverhältnis, dadurch wurde das Bild hineingequetscht (gemessen: 8,3 % zu breit). Rahmen und Bild rechnen jetzt beide mit demselben Verhältnis.",
"Fixed: “I cannot move the image.” Technically you could, but with the frame fully filled the crop sits against the stop in one direction — dragging did nothing there. It now says which way the image can still move; double-tap zooms, the arrow keys nudge, and the zoom slider shows its factor.": "Behoben: „Ich kann das Bild nicht verschieben.\" Technisch ging es, aber bei voll ausgefülltem Rahmen sitzt der Ausschnitt in einer Richtung am Anschlag — Ziehen bewirkte dort nichts. Jetzt steht dabei, wohin sich das Bild noch bewegen lässt; Doppeltipp zoomt, Pfeiltasten schieben, und der Zoomregler zeigt seinen Faktor.",
"Fixed: a new password now also ends every sign-in that is still open. An existing session used to stay valid for up to 30 days — so resetting your password because somebody else had got in did nothing for you.": "Behoben: Ein neues Passwort beendet jetzt auch alle noch offenen Anmeldungen. Vorher blieb eine bestehende Sitzung bis zu 30 Tage gültig — wer sein Passwort zurücksetzte, weil jemand anderes hineingekommen war, hatte davon also nichts.",
@@ -148,14 +150,14 @@
"Share: in the library, tap Share — for one image or for several selected ones at once. The result is a link that someone without a Klarbild account can open too; from there the image can be downloaded at full resolution.": "Teilen: In der Bibliothek auf Teilen tippen — einzeln oder für mehrere markierte Bilder auf einmal. Es entsteht ein Link, den auch jemand ohne Klarbild-Konto öffnen kann; von dort lässt sich das Bild in voller Auflösung herunterladen.",
"Staying safe: every link expires by itself (30 days by default), can be switched off at any time and protected with a passphrase if you want. Send the passphrase separately from the link — otherwise it is of no use.": "Sicher bleiben: Jeder Link läuft von selbst ab (Standard 30 Tage), lässt sich jederzeit abschalten und auf Wunsch mit einem Zugangswort schützen. Das Wort schickst du dann getrennt vom Link — sonst nützt es nichts.",
"Storage management: thumbnails, deleting sources, an automatic retention period.": "Speicherverwaltung: Vorschaubilder, Quellen löschen, automatische Aufbewahrungsfrist.",
+ "TV 16:9 “Extend”: generate more scene around the subject (outpainting) instead of only cropping.": "TV 16:9 „Erweitern\": Szene rund ums Motiv weiter generieren (Outpainting) statt nur zuschneiden.",
+ "TV 16:9 now delivers automatically into the folder “TV-Backgrounds” on the target.": "TV 16:9 liefert jetzt automatisch in die Galerie „TV-Backgrounds\".",
"Telegram & MCP keep up: the Telegram bot and the MCP server (for assistants) now know the selectable file format and the custom sizes too — whichever way you start a job.": "Telegram & MCP ziehen mit: Der Telegram-Bot und der MCP-Server (für Assistenten) kennen jetzt ebenfalls das wählbare Dateiformat und die eigenen Formate — egal, worüber du einen Auftrag startest.",
"Telegram entirely button-driven: a permanent keyboard & menu — Edit, Combine, “✨ New image”, Keep editing, with no commands at all.": "Telegram komplett knopfbasiert: Dauertastatur & Menü — Bearbeiten, Kombinieren, „✨ Neues Bild\", Weiterbearbeiten, ganz ohne Befehle.",
- "The Frame “Extend”: generate more scene around the subject (outpainting) instead of only cropping.": "The Frame „Erweitern\": Szene rund ums Motiv weiter generieren (Outpainting) statt nur zuschneiden.",
- "The Frame now delivers automatically into the folder “TheFrame-Backgrounds” on the target.": "The Frame liefert jetzt automatisch in die Galerie „TheFrame-Backgrounds\".",
"The area is now called “Print” (it was “Passport photos”) — it does far more than passport photos, after all. Old links redirect automatically.": "Der Bereich heißt jetzt „Drucken\" (vorher „Passbilder\") — er kann ja weit mehr als Passbilder. Alte Verweise leiten automatisch weiter.",
"The delivery target gets exactly your format: what is delivered is now exactly the file format you set — globally in the admin settings or per job in the studio (PNG or JPG). No more forced conversion. Cut-out subjects always stay PNG. (The images that had “disappeared” in the meantime were there the whole time, by the way — it was the sort order in the target’s web interface.)": "Das Auslieferungsziel bekommt genau dein Format: Ausgeliefert wird jetzt exakt das Dateiformat, das du eingestellt hast — global in den Admin-Einstellungen oder pro Auftrag im Studio (PNG oder JPG). Keine erzwungene Umwandlung mehr. Freigestellte Motive bleiben immer PNG. (Die zwischenzeitlich „verschwundenen\" Bilder waren übrigens die ganze Zeit da — es lag an der Sortierung in der Weboberfläche des Ziels.)",
"The file format can be chosen: globally in the admin settings (default file format PNG/JPG) and per conversion in the studio (default / PNG / JPG). JPG only without transparency.": "Dateiformat wählbar: global in den Admin-Einstellungen (Standard-Dateiformat PNG/JPG) und pro Umwandlung im Studio (Standard / PNG / JPG). JPG nur ohne Transparenz.",
- "The new name: 2026-08-20_143207_ada-badge_the-frame_a3f9.jpg — date, time to the second, subject, format and a short id. Because the timestamp comes first, every file listing sorts chronologically by itself — on the delivery target, in the file manager, on the backup mirror. The short id comes from the image's id and is therefore guaranteed to be unique.": "Der neue Name: 2026-08-20_143207_ada-badge_the-frame_a3f9.jpg — also Datum, Uhrzeit auf die Sekunde, Motiv, Format und ein kurzes Kürzel. Weil der Zeitstempel vorn steht, sortiert jede Dateiliste von allein chronologisch — am Auslieferungsziel, im Dateimanager, auf dem Spiegel. Das Kürzel stammt aus der Bild-Kennung und ist damit garantiert eindeutig.",
+ "The new name: 2026-08-20_143207_ada-badge_tv169_a3f9.jpg — date, time to the second, subject, format and a short id. Because the timestamp comes first, every file listing sorts chronologically by itself — on the delivery target, in the file manager, on the backup mirror. The short id comes from the image's id and is therefore guaranteed to be unique.": "Der neue Name: 2026-08-20_143207_ada-badge_tv169_a3f9.jpg — also Datum, Uhrzeit auf die Sekunde, Motiv, Format und ein kurzes Kürzel. Weil der Zeitstempel vorn steht, sortiert jede Dateiliste von allein chronologisch — am Auslieferungsziel, im Dateimanager, auf dem Spiegel. Das Kürzel stammt aus der Bild-Kennung und ist damit garantiert eindeutig.",
"The same image at two sizes? Tap Duplicate — the image appears a second time in the list and gets its own size there. No more renaming and uploading again.": "Dasselbe Bild in zwei Maßen? Duplizieren antippen — das Bild erscheint ein zweites Mal in der Liste und bekommt dort sein eigenes Maß. Kein Umbenennen und erneutes Hochladen mehr.",
"The time is local time, not UTC. An image made at 00:30 now carries the right date instead of the previous day's.": "Uhrzeit in deutscher Zeit, nicht in UTC. Ein Bild von 0:30 Uhr trägt jetzt das richtige Datum und nicht mehr das des Vortags.",
"Thumbnails for the library (fast & frugal).": "Vorschaubilder für die Bibliothek (schnell & sparsam).",
@@ -175,6 +177,7 @@
"API token for external/programmatic access (for example Klarbild MCP: “take these images and process them”).": "API-Token für externen/programmatischen Zugriff (z. B. Klarbild-MCP: „nimm diese Bilder und verarbeite sie\").",
"API token generated.": "API-Token erzeugt.",
"Access & limits": "Zugang & Grenzen",
+ "Account": "Konto",
"Add a note": "Dazu schreiben",
"Add a white sticker border (only together with Cut out).": "Weißen Stickerrand anlegen (nur mit Freistellen).",
"Add target": "Ziel hinzufügen",
@@ -182,6 +185,8 @@
"Additional target": "Zusätzliches Ziel",
"Address removed.": "Adresse entfernt.",
"Address saved.": "Adresse gespeichert.",
+ "Admin": "Admin",
+ "Admin · Klarbild": "Admin · Klarbild",
"Admin → Email": "Admin → E-Mail",
"Admins always see everything. “Own only”: everyone sees only the images they generated themselves.": "Admins sehen immer alles. „Nur eigene\": jede/r sieht ausschließlich die selbst erzeugten Bilder.",
"Again": "Erneut",
@@ -219,6 +224,7 @@
"Back up all images": "Alle Bilder sichern",
"Backing up to the mirror … (may take a while)": "Sichere auf den Sicherungsspiegel … (kann dauern)",
"Backing up … (may take a while)": "Sichere … (kann dauern)",
+ "Backup": "Sicherung",
"Backup mirror": "Zweite Sicherung",
"Backup mirror (second copy)": "Sicherungsspiegel (zweite Sicherung)",
"Backup off": "Backup aus",
@@ -251,6 +257,9 @@
"Change passphrase": "Wort ändern",
"Change validity": "Gültigkeit ändern",
"Change validity …": "Gültigkeit ändern …",
+ "Changelog": "Änderungen",
+ "Changelog · Klarbild": "Änderungen · Klarbild",
+ "Chat {id}": "Chat {id}",
"Check library": "Bibliothek prüfen",
"Checking connection …": "Prüfe Verbindung …",
"Checking file names …": "Prüfe Dateinamen …",
@@ -262,10 +271,10 @@
"Choose a way, otherwise the image is left out.": "Wähle einen Weg, sonst bleibt das Bild außen vor.",
"Choose images": "Bilder wählen",
"Choose sheet": "Bogen wählen",
- "Choose the final size for each image. Every format from AI generation is here — biometric passport photo 35 × 45 mm, 2 × 3 to 6 × 9 cm, 9 × 13 to 24 × 30, poster and frame sizes 30 × 40 to 70 × 100, squares, DIN A6–A2 and the aspect ratios (16:9 “The Frame”, 9:16, 3:2, 4:3, 5:4) — or a custom size: 12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) or 4:3/15 (ratio 4:3, longer edge 15 cm).": "Je Bild das Endmaß wählen. Es sind alle Formate der KI-Generierung da — biometrisches Passbild 35 × 45 mm, 2 × 3 bis 6 × 9 cm, 9 × 13 bis 24 × 30, Poster- und Rahmenmaße 30 × 40 bis 70 × 100, Quadrate, DIN A6–A2 und die Seitenverhältnisse (16:9 „The Frame\", 9:16, 3:2, 4:3, 5:4) — oder Eigenes Maß: 12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) oder 4:3/15 (Verhältnis 4:3, längere Kante 15 cm).",
+ "Choose the final size for each image. Every format from AI generation is here — biometric passport photo 35 × 45 mm, 2 × 3 to 6 × 9 cm, 9 × 13 to 24 × 30, poster and frame sizes 30 × 40 to 70 × 100, squares, DIN A6–A2 and the aspect ratios (16:9 TV, 9:16, 3:2, 4:3, 5:4) — or a custom size: 12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) or 4:3/15 (ratio 4:3, longer edge 15 cm).": "Je Bild das Endmaß wählen. Es sind alle Formate der KI-Generierung da — biometrisches Passbild 35 × 45 mm, 2 × 3 bis 6 × 9 cm, 9 × 13 bis 24 × 30, Poster- und Rahmenmaße 30 × 40 bis 70 × 100, Quadrate, DIN A6–A2 und die Seitenverhältnisse (16:9 TV 16:9, 9:16, 3:2, 4:3, 5:4) — oder Eigenes Maß: 12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) oder 4:3/15 (Verhältnis 4:3, längere Kante 15 cm).",
"Choose the paper size: DIN A6–A2 including A3+ (329 × 483 mm), photo paper cuts 9 × 13 to 20 × 30, US Letter/Legal — or a paper size of your own.": "Papierformat wählen: DIN A6–A2 inklusive A3+ (329 × 483 mm), Fotopapier-Zuschnitte 9 × 13 bis 20 × 30, US Letter/Legal — oder ein eigenes Papiermaß.",
"Choose the quality and where it goes (library, delivery target or both), then Start.": "Qualität und Ziel (Bibliothek, Auslieferungsziel oder beides) wählen, dann Loslegen.",
- "Choose what should happen: Clean up (frame, wall, shop interface gone), Cut out (subject free, background transparent), Format (30 × 40 cm or The Frame, for instance), Contour (white sticker edge).": "Wählen, was passieren soll: Bereinigen (Rahmen, Wand, Shop-Oberfläche weg), Freistellen (Motiv frei, Hintergrund transparent), Format (z. B. 30 × 40 cm oder The Frame), Kontur (weißer Stickerrand).",
+ "Choose what should happen: Clean up (frame, wall, shop interface gone), Cut out (subject free, background transparent), Format (30 × 40 cm or a 16:9 TV frame, for instance), Contour (white sticker edge).": "Wählen, was passieren soll: Bereinigen (Rahmen, Wand, Shop-Oberfläche weg), Freistellen (Motiv frei, Hintergrund transparent), Format (z. B. 30 × 40 cm oder TV 16:9), Kontur (weißer Stickerrand).",
"Clean up": "Bereinigen",
"Clean up leftovers": "Reste aufräumen",
"Clean up screenshots, cut them out, bring them to size.": "Screenshots bereinigen, freistellen, aufs Format bringen.",
@@ -303,7 +312,6 @@
"Create link": "Link erzeugen",
"Create the PDF and choose “Actual size / 100%” in the print dialog. Done.": "PDF erzeugen und im Druckdialog „Tatsächliche Größe / 100 %“ wählen. Fertig.",
"Credit card 85.6 × 54 mm": "Scheckkarte 85,6 × 54 mm",
- "Cricut sheet size (cm)": "Cricut-Bogenmaß (cm)",
"Crop": "Zuschneiden",
"Crop marks as in prepress": "Schnittmarken wie in der Druckvorstufe",
"Crop · {size}": "Zuschnitt · {size}",
@@ -314,7 +322,7 @@
"Custom size (cm)": "Eigenes Maß (cm)",
"Custom size …": "Eigenes Maß …",
"Cut out": "Freistellen",
- "Cut out + The Frame makes no sense — pick one.": "Freistellen + The Frame ergibt keinen Sinn — bitte eins wählen.",
+ "Cut out + TV 16:9 makes no sense — pick one.": "Freistellen + TV 16:9 ergibt keinen Sinn — bitte eins wählen.",
"Cutting": "Schneiden",
"Cutting aids": "Schnitthilfen",
"DIN A0 (84.1 × 118.9 cm)": "DIN A0 (84,1 × 118,9 cm)",
@@ -329,6 +337,8 @@
"DIN A7–A0, photo paper, US sizes, custom size": "DIN A7–A0, Fotopapier, US-Maße, freies Maß",
"DL 9.9 × 21 cm": "DIN lang 9,9 × 21 cm",
"DL landscape 21 × 9.9 cm": "DIN lang quer 21 × 9,9 cm",
+ "DNS ✓ ({address})": "DNS ✓ ({address})",
+ "DNS ✕ ({error})": "DNS ✕ ({error})",
"Default": "Standard",
"Default delivery target": "Standard-Auslieferungsziel",
"Default dpi": "Standard-dpi",
@@ -416,10 +426,11 @@
"For power users there is also the “/” command menu (/new, /presets, /status) — it is not needed.": "Für Profis gibt es zusätzlich das „/\"-Befehlsmenü (/new, /presets, /status) — nötig ist es nicht.",
"For printing always choose 300 dpi and a cm format — the pixel dimensions are right there next to it.": "Für Druck immer 300 dpi und ein cm-Format wählen — die Pixelmaße stehen direkt dabei.",
"For that you first need an email address (above).": "Dafür brauchst du zuerst eine E-Mail-Adresse (oben).",
- "For the format, choose “Crop” or “Extend” — extending generates more scene around the subject (outpainting), which is ideal for The Frame.": "Beim Format „Zuschneiden\" oder „Erweitern\" wählen — Erweitern erzeugt mehr Szene rund ums Motiv (Outpainting), ideal für The Frame.",
+ "For the format, choose “Crop” or “Extend” — extending generates more scene around the subject (outpainting), which is ideal for a wide TV frame.": "Beim Format „Zuschneiden\" oder „Erweitern\" wählen — Erweitern erzeugt mehr Szene rund ums Motiv (Outpainting), ideal für TV 16:9.",
"Force private": "Privat erzwingen",
"Forgot your password": "Passwort vergessen",
"Forgot your password?": "Passwort vergessen?",
+ "Format (optional)": "Format (optional)",
"Format of {name}": "Format von {name}",
"From the library": "Aus Bibliothek",
"Gap automatic ({gap} mm — to suit the marks)": "Abstand automatisch ({gap} mm — passend zu den Marken)",
@@ -434,14 +445,16 @@
"Generate preview images": "Vorschaubilder erzeugen",
"Generate token": "Token erzeugen",
"Generating an alternative …": "Erzeuge Alternative …",
- "Give every image in the library a unique name?\n\nThe files themselves stay untouched — they are stored under their ID. Copies already placed on the delivery target keep their old name; that is what “Deliver again” is for afterwards.": "Alle Bilder der Bibliothek auf eindeutige Namen bringen?\n\nDie Dateien selbst bleiben unberührt — sie liegen unter ihrer ID im Speicher. Bereits am Auslieferungsziel abgelegte Kopien behalten ihren alten Namen; dafür gibt es danach „Erneut ausliefern\".",
+ "Give every image in the library a unique name?\n\nThe files themselves stay untouched — they are stored under their ID. ": "Alle Bilder der Bibliothek auf eindeutige Namen bringen?\n\nDie Dateien selbst bleiben unberührt — sie liegen unter ihrer ID im Speicher. Bereits am Auslieferungsziel abgelegte Kopien behalten ihren alten Namen; dafür gibt es danach „Erneut ausliefern\".",
"Gives exactly {w} × {h} pixels at 300 dpi — ready to print.": "Ergibt exakt {w} × {h} Pixel bei 300 dpi — druckfertig.",
"Glue flap (mm)": "Klebefalz (mm)",
"Grab the image and drag · double-tap zooms · arrow keys for fine work.": "Bild anfassen und ziehen · Doppeltipp zoomt · Pfeiltasten für Feinarbeit.",
"Green": "Grün",
"Heading": "Überschrift",
+ "Help": "Hilfe",
"Help · Klarbild": "Anleitung · Klarbild",
"Hide visits": "Zugriffe zu",
+ "Host": "Host",
"How Klarbild works": "So funktioniert Klarbild",
"If the aspect ratio does not fit, you decide: crop or letterbox. In the crop window you move and zoom the original inside the target frame — with the mouse, a finger, a double-tap or the arrow keys. The crop is stored relatively and survives any resolution.": "Passt das Seitenverhältnis nicht, entscheidest du: zuschneiden oder Rand lassen. Im Zuschnitt-Fenster verschiebst und zoomst du das Original im Zielrahmen — mit Maus, Finger, Doppeltipp oder Pfeiltasten. Der Ausschnitt wird relativ gespeichert und überlebt jede Auflösung.",
"If there is an account for this address, the message is on its way. Have a look in the spam folder too.": "Wenn es zu dieser Adresse ein Konto gibt, ist die Nachricht unterwegs. Schau auch im Spam nach.",
@@ -491,6 +504,7 @@
"Links that let other people look at your images — without an account. Here you can see how often they were opened, and switch them off whenever you want.": "Links, mit denen andere deine Bilder ansehen können — ohne Konto. Hier siehst du, wie oft sie geöffnet wurden, und kannst sie jederzeit abschalten.",
"Loading …": "Wird geladen …",
"Mailbox password": "Postfach-Passwort",
+ "Main navigation": "Hauptnavigation",
"Make the print PDF": "Druck-PDF erzeugen",
"Manage all links": "Alle Links verwalten",
"Margin to the paper edge (mm)": "Rand zum Papier (mm)",
@@ -514,6 +528,7 @@
"My account · Klarbild": "Mein Konto · Klarbild",
"My account, sharing & email": "Mein Konto, Teilen & E-Mail",
"NSFW off": "NSFW aus",
+ "Name": "Name",
"Name is missing.": "Name fehlt.",
"Name of the preset?": "Name des Presets?",
"Name of the preset? (e.g. “Nursery set”)": "Name der Vorlage? (z. B. „Kita-Satz\")",
@@ -588,6 +603,7 @@
"Own border colour": "Eigene Randfarbe",
"Own instruction (optional)": "Eigene Anweisung (optional)",
"Own only": "Nur eigene",
+ "PDF": "PDF",
"PDF at original size, 72–1200 dpi": "PDF in Originalgröße, 72–1200 dpi",
"PDF generated again. When printing, choose “Actual size / 100 %”.": "PDF neu erzeugt. Beim Drucken „Tatsächliche Größe / 100 %\" wählen.",
"PDF ready · {sheets}. When printing, choose “Actual size / 100 %”.": "PDF fertig · {sheets}. Beim Drucken „Tatsächliche Größe / 100 %\" wählen.",
@@ -634,10 +650,12 @@
"Please give a valid paper size.": "Bitte ein gültiges Papiermaß angeben.",
"Polaroid · image area 79 × 79 mm": "Polaroid · Bildfläche 79 × 79 mm",
"Polaroid · whole card 88 × 107 mm": "Polaroid · ganze Karte 88 × 107 mm",
+ "Port": "Port",
"Port reachable in {ms}ms ✓": "Port erreichbar in {ms}ms ✓",
"Portrait": "Hochformat",
"Portrait (9:16)": "Hochformat (9:16)",
"Postcard 14.8 × 10.5 cm (A6 landscape)": "Postkarte 14,8 × 10,5 cm (A6 quer)",
+ "Poster": "Poster",
"Poster & frames": "Poster & Rahmen",
"Preset deleted.": "Preset gelöscht.",
"Preset loaded — the image was taken over for every format.": "Vorlage geladen — das Bild wurde für jedes Format übernommen.",
@@ -654,6 +672,7 @@
"Printed last": "Zuletzt gedruckt",
"Private off": "Privat aus",
"Private session": "Private Session",
+ "Prompt": "Prompt",
"Prompt copied.": "Prompt kopiert.",
"Proof": "Nachweis",
"Protected with a passphrase": "Mit Zugangswort geschützt",
@@ -687,6 +706,7 @@
"Rotate to save space": "Zum Platzsparen drehen",
"Run it yourself": "Selbst betreiben",
"Run “Check library” first — then you can see what would change.": "Erst „Bibliothek prüfen\" — dann siehst du, was sich ändern würde.",
+ "Running": "Läuft",
"Save": "Speichern",
"Save as PDF / print": "Als PDF / drucken",
"Save password": "Passwort speichern",
@@ -731,6 +751,7 @@
"Share links": "Teilen-Links",
"Share links are only valid for a limited time. Whoever sent it to you can create a new one.": "Teilen-Links gelten nur eine begrenzte Zeit. Wer ihn dir geschickt hat, kann einen neuen erzeugen.",
"Share {n} images": "{n} Bilder teilen",
+ "Shared": "Geteilt",
"Shared links": "Geteilte Links",
"Shared links · Klarbild": "Geteilte Links · Klarbild",
"Sharing images, email, forgotten passwords": "Bilder teilen, E-Mail, Passwort vergessen",
@@ -743,6 +764,7 @@
"Shown as": "Angezeigt als",
"Sign in": "Anmelden",
"Sign in · Klarbild": "Anmelden · Klarbild",
+ "Sign out": "Abmelden",
"Sign-in failed.": "Anmeldung fehlgeschlagen.",
"Size not recognised. Examples: “13x18” (cm), “35x45mm”, “4:3/15”.": "Maß nicht erkannt. Beispiele: „13x18\" (cm), „35x45mm\", „4:3/15\".",
"Size not recognised. Examples: “21x29.7”, “329x483mm”.": "Maß nicht erkannt. Beispiele: „21x29,7\", „329x483mm\".",
@@ -766,6 +788,7 @@
"Stickers: choose Cut out + Contour together.": "Sticker: Freistellen + Kontur zusammen wählen.",
"Storage & cleanup": "Speicher & Aufräumen",
"Stored encrypted, takes precedence over the environment variable.": "Verschlüsselt gespeichert, hat Vorrang vor der Umgebungsvariable.",
+ "Studio": "Studio",
"Subject only, background transparent.": "Nur das Motiv, Hintergrund transparent.",
"Switch back on": "Wieder freigeben",
"Switch off": "Abschalten",
@@ -778,6 +801,7 @@
"Target created.": "Ziel angelegt.",
"Telegram bot": "Telegram-Bot",
"Tell me when a job is finished": "Sag mir Bescheid, wenn ein Auftrag fertig ist",
+ "Test": "Testen",
"Test connection": "Verbindung testen",
"Test message": "Testnachricht",
"Test message to": "Testnachricht an",
@@ -839,7 +863,7 @@
"Unique file names — images no longer overwrite each other": "Eindeutige Dateinamen — Bilder überschreiben sich nicht mehr",
"Unit": "Einheit",
"Unlink": "Trennen",
- "Upload all already delivered images again — under the new name?\n\nThe old files stay on the target and have to be removed there by hand. This can take a while.": "Alle bereits ausgelieferten Bilder erneut hochladen — unter dem neuen Namen?\n\nDie alten Dateien bleiben am Ziel liegen und müssen dort von Hand entfernt werden. Das kann dauern.",
+ "Upload all already delivered images again — under the new name?\n\n": "Alle bereits ausgelieferten Bilder erneut hochladen — unter dem neuen Namen?\n\nDie alten Dateien bleiben am Ziel liegen und müssen dort von Hand entfernt werden. Das kann dauern.",
"Upload failed": "Upload fehlgeschlagen",
"Upload images (drag them in, ⌘/Ctrl + V) — or Choose from the library: everything Klarbild has already produced, with search, by folder and several at once. No more detour through another upload.": "Bilder hochladen (ziehen, ⌘/Strg + V) — oder Aus der Bibliothek wählen: alles, was Klarbild schon erzeugt hat, mit Suche, nach Ordner und mehrere auf einmal. Kein Umweg mehr über einen erneuten Upload.",
"Upload screenshots — drag them in, paste with ⌘/Ctrl + V or tap (up to 100 at once).": "Screenshots hochladen — ziehen, mit ⌘/Strg + V einfügen oder tippen (bis zu 100 auf einmal).",
@@ -914,7 +938,7 @@
"e.g. 5 (=5×5 cm) or 5x7": "z. B. 5 (=5×5 cm) oder 5x7",
"e.g. Ada in the garden": "z. B. Ada im Garten",
"e.g. Nursery photos August": "z. B. Kita-Fotos August",
- "e.g. The Frame FTP": "z. B. The Frame FTP",
+ "e.g. Studio archive": "z. B. TV 16:9 FTP",
"e.g. mirror.local or DDNS": "z. B. spiegel.local oder DDNS",
"e.g. smtp.example.com": "z. B. smtp.example.com",
"e.g. “A minimalist poster with an olive branch on a sand-coloured ground.”": "z. B. „Ein minimalistisches Poster mit einem Olivenzweig auf sandfarbenem Grund.“",
@@ -940,6 +964,7 @@
"off": "aus",
"only {dpi} dpi — goes slightly soft": "nur {dpi} dpi — wird leicht weich",
"only {dpi} dpi — goes visibly blurred, take a smaller format or a bigger image": "nur {dpi} dpi — wird sichtbar unscharf, kleineres Format oder größeres Bild nehmen",
+ "optional": "optional",
"or": "oder",
"or send it straight from here": "oder direkt von hier verschicken",
"own text": "eigener Text",
@@ -965,6 +990,7 @@
"top centre": "oben mittig",
"top left": "oben links",
"top right": "oben rechts",
+ "transparent": "transparent",
"valid until {date}": "gültig bis {date}",
"view only": "nur ansehen",
"views": "Aufrufe",
@@ -1025,9 +1051,10 @@
"{sizes} on a usable {usable}.": "{sizes} bei nutzbaren {usable}.",
"{size} = {w} × {h} px": "{size} = {w} × {h} px",
"{size} does not fit on {paper}.": "{size} passt nicht auf {paper}.",
+ "{title} · Klarbild": "{title} · Klarbild",
"“Backup” targets automatically receive all results (like the backup mirror).": "„Backup\"-Ziele erhalten automatisch alle Ergebnisse (wie der Sicherungsspiegel).",
"“Deliver again” uploads every already delivered image to the target again under the new name. The old files stay there — deleting something at the client automatically would be the wrong reflex; you do that on the delivery target yourself.": "„Erneut ausliefern\" lädt alle schon ausgelieferten Bilder unter dem neuen Namen erneut zum Ziel hoch. Die alten Dateien bleiben dort liegen — automatisch etwas beim Kunden zu löschen wäre der falsche Reflex; das machst du am Auslieferungsziel selbst.",
- "“Extend” produces more scene around the subject (outpainting) instead of cropping — made for The Frame.": "„Erweitern\" erzeugt mehr Szene rund ums Motiv (Outpainting), statt zuzuschneiden — ideal für The Frame.",
+ "“Extend” produces more scene around the subject (outpainting) instead of cropping — made for wide TV frames.": "„Erweitern\" erzeugt mehr Szene rund ums Motiv (Outpainting), statt zuzuschneiden — ideal für TV 16:9.",
"“Passport photos” becomes “Print” — 86 image sizes, crop repaired": "Aus „Passbilder\" wird „Drucken\" — 86 Bildmaße, Zuschnitt repariert",
"“Show folder” lists what actually sits where over SFTP.": "„Ordner anzeigen\" listet, was per SFTP tatsächlich wo liegt.",
"“Test connection” only checks the login. Only the test message proves that the mail really arrives — look in the spam folder too.": "„Verbindung testen\" prüft nur die Anmeldung. Erst die Testnachricht beweist, dass die Mail wirklich ankommt — schau auch im Spam-Ordner nach.",
diff --git a/src/middleware.ts b/src/middleware.ts
index 4b407ee..ee9fa01 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -5,7 +5,7 @@ import { one } from './lib/db';
import { LOCALE_COOKIE, resolveLocale, isLocale } from './lib/i18n';
const PUBLIC_PATHS = [
- /^\/login/, /^\/tour/, /^\/api\/auth\/login/, /^\/api\/health/, /^\/g\//,
+ /^\/login/, /^\/tour/, /^\/api\/auth\/login/, /^\/api\/health/,
/^\/api\/telegram\/webhook/, /^\/llms\.txt/,
// Forgot password — must be reachable without being signed in, otherwise it's pointless.
/^\/password/, /^\/api\/auth\/reset/,
diff --git a/src/pages/changelog.astro b/src/pages/changelog.astro
index 2267c34..da8f74c 100644
--- a/src/pages/changelog.astro
+++ b/src/pages/changelog.astro
@@ -113,7 +113,7 @@ const dict = dictFor(locale);
Print tab is the photo-lab part of Klarbild: no model, no cost, no waiting. Only cropping, scaling and geometry — from the biometric passport photo to the 30 × 40 poster.')} />
12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) or 4:3/15 (ratio 4:3, longer edge 15 cm).')} />
+ 12x15 (cm), 35x45mm, 5 (= 5 × 5 cm) or 4:3/15 (ratio 4:3, longer edge 15 cm).')} />