feat: Expandable metadata drawer + transcription system (#175, #176) #178

Merged
marcel merged 47 commits from feat/issue-175-176-metadata-drawer-transcription into main 2026-04-06 11:31:11 +02:00
4 changed files with 20 additions and 8 deletions
Showing only changes of commit 193bd73af1 - Show all commits

View File

@@ -318,7 +318,11 @@
"comment_placeholder": "Kommentar schreiben…", "comment_placeholder": "Kommentar schreiben…",
"comment_btn_post": "Senden", "comment_btn_post": "Senden",
"comment_btn_reply": "Antworten", "comment_btn_reply": "Antworten",
"comment_edited_label": "· bearbeitet", "comment_edited_label": "(Bearbeitet)",
"comment_time_just_now": "gerade eben",
"comment_time_minutes": "vor {count} Minute(n)",
"comment_time_hours": "vor {count} Stunde(n)",
"comment_time_days": "vor {count} Tag(en)",
"comment_panel_title": "Kommentare", "comment_panel_title": "Kommentare",
"comment_panel_close": "Schließen", "comment_panel_close": "Schließen",
"doc_panel_tab_metadata": "Metadaten", "doc_panel_tab_metadata": "Metadaten",

View File

@@ -318,7 +318,11 @@
"comment_placeholder": "Write a comment…", "comment_placeholder": "Write a comment…",
"comment_btn_post": "Send", "comment_btn_post": "Send",
"comment_btn_reply": "Reply", "comment_btn_reply": "Reply",
"comment_edited_label": "· edited", "comment_edited_label": "(Edited)",
"comment_time_just_now": "just now",
"comment_time_minutes": "{count} minute(s) ago",
"comment_time_hours": "{count} hour(s) ago",
"comment_time_days": "{count} day(s) ago",
"comment_panel_title": "Comments", "comment_panel_title": "Comments",
"comment_panel_close": "Close", "comment_panel_close": "Close",
"doc_panel_tab_metadata": "Metadata", "doc_panel_tab_metadata": "Metadata",

View File

@@ -318,7 +318,11 @@
"comment_placeholder": "Escribe un comentario…", "comment_placeholder": "Escribe un comentario…",
"comment_btn_post": "Enviar", "comment_btn_post": "Enviar",
"comment_btn_reply": "Responder", "comment_btn_reply": "Responder",
"comment_edited_label": "· editado", "comment_edited_label": "(Editado)",
"comment_time_just_now": "justo ahora",
"comment_time_minutes": "hace {count} minuto(s)",
"comment_time_hours": "hace {count} hora(s)",
"comment_time_days": "hace {count} día(s)",
"comment_panel_title": "Comentarios", "comment_panel_title": "Comentarios",
"comment_panel_close": "Cerrar", "comment_panel_close": "Cerrar",
"doc_panel_tab_metadata": "Metadatos", "doc_panel_tab_metadata": "Metadatos",

View File

@@ -66,12 +66,12 @@ $effect(() => {
function timeAgo(iso: string): string { function timeAgo(iso: string): string {
const diff = Date.now() - new Date(iso).getTime(); const diff = Date.now() - new Date(iso).getTime();
const minutes = Math.floor(diff / 60000); const minutes = Math.floor(diff / 60000);
if (minutes < 1) return 'gerade eben'; if (minutes < 1) return m.comment_time_just_now();
if (minutes < 60) return `vor ${minutes} Minute${minutes === 1 ? '' : 'n'}`; if (minutes < 60) return m.comment_time_minutes({ count: minutes });
const hours = Math.floor(minutes / 60); const hours = Math.floor(minutes / 60);
if (hours < 24) return `vor ${hours} Stunde${hours === 1 ? '' : 'n'}`; if (hours < 24) return m.comment_time_hours({ count: hours });
const days = Math.floor(hours / 24); const days = Math.floor(hours / 24);
return `vor ${days} Tag${days === 1 ? '' : 'en'}`; return m.comment_time_days({ count: days });
} }
function wasEdited(c: { createdAt: string; updatedAt: string }): boolean { function wasEdited(c: { createdAt: string; updatedAt: string }): boolean {
@@ -261,7 +261,7 @@ onMount(async () => {
<span class="font-sans text-xs font-semibold text-ink">{comment.authorName}</span> <span class="font-sans text-xs font-semibold text-ink">{comment.authorName}</span>
{#if wasEdited(comment)} {#if wasEdited(comment)}
<span class="font-sans text-xs text-ink-3" <span class="font-sans text-xs text-ink-3"
>{timeAgo(comment.updatedAt)} (Bearbeitet)</span >{timeAgo(comment.updatedAt)} {m.comment_edited_label()}</span
> >
{:else} {:else}
<span class="font-sans text-xs text-ink-3">{timeAgo(comment.createdAt)}</span> <span class="font-sans text-xs text-ink-3">{timeAgo(comment.createdAt)}</span>