feat: Picdrop-style color tags (Rot/Orange/Gruen/Final) in library + in .md metadata; tap-to-open fullscreen for iPhone Save-to-Photos

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
This commit is contained in:
2026-07-24 07:38:20 +00:00
parent f95a3b58b7
commit af34cb9cc8
6 changed files with 100 additions and 10 deletions
+3 -1
View File
@@ -4,11 +4,12 @@ import { one } from './db';
export async function buildMetadataMd(itemId: string): Promise<string> {
const it = await one<any>(
`SELECT i.filename, i.output_px, i.has_alpha, i.model_used, i.prompt_used, i.cost,
i.created_at, i.delivery_status, j.mode, j.recipe_snapshot
i.created_at, i.delivery_status, i.color_tag, j.mode, j.recipe_snapshot
FROM items i JOIN jobs j ON j.id=i.job_id WHERE i.id=$1`, [itemId]);
if (!it) return '';
const r = it.recipe_snapshot || {};
const tasks = Array.isArray(r.tasks) ? r.tasks.join(', ') : '';
const TAG: Record<string, string> = { red: 'Rot', orange: 'Orange', green: 'Grün', final: 'Final' };
const lines = [
`# ${it.filename || itemId}`,
'',
@@ -19,6 +20,7 @@ export async function buildMetadataMd(itemId: string): Promise<string> {
it.output_px ? `- **Auflösung:** ${it.output_px} px${r.dpi ? ` @ ${r.dpi} dpi` : ''}` : '',
`- **Transparenz:** ${it.has_alpha ? 'ja' : 'nein'}`,
it.model_used ? `- **Modell:** ${it.model_used}` : '',
it.color_tag ? `- **Markierung:** ${TAG[it.color_tag] || it.color_tag}` : '',
it.cost != null ? `- **Kosten:** $${Number(it.cost).toFixed(4)}` : '',
'',
'## Prompt',