fix(timeline): show EventPill provenance even when the event has no date
The provenance token (abgeleitet/kuratiert) was nested inside the
{#if dateLabel} block, so an undated or UNKNOWN-precision event — e.g.
one in the undated bucket — rendered no provenance at all. Compose the
subtitle as an optional "{date} · " prefix in front of the always-present
provenance instead.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,9 @@ const dateLabel = $derived(timelineDateLabel(entry.eventDate, entry.precision, e
|
||||
const provenance = $derived(
|
||||
entry.derived ? m.timeline_provenance_derived() : m.timeline_provenance_curated()
|
||||
);
|
||||
// Provenance always shows; the date is an optional prefix so an undated event
|
||||
// still reads "abgeleitet"/"kuratiert" (REQ-007).
|
||||
const subtitle = $derived(dateLabel ? `${dateLabel} · ${provenance}` : provenance);
|
||||
const canEdit = $derived(!entry.derived && entry.eventId != null);
|
||||
</script>
|
||||
|
||||
@@ -46,9 +49,7 @@ const canEdit = $derived(!entry.derived && entry.eventId != null);
|
||||
>{entry.title}</span
|
||||
>
|
||||
{/if}
|
||||
{#if dateLabel}
|
||||
<span class="block font-sans text-xs text-ink-3">{dateLabel} · {provenance}</span>
|
||||
{/if}
|
||||
<span class="block font-sans text-xs text-ink-3">{subtitle}</span>
|
||||
</span>
|
||||
{#if canEdit}
|
||||
<a
|
||||
|
||||
Reference in New Issue
Block a user