feat(timeline): wire EventNote into EventPill + WorldBand (REQ-004)
EventPill (PERSONAL curated events) and WorldBand (HISTORICAL events) now render the curator note immediately below the title line. Derived events and letters carry null description so EventNote renders nothing. Refs #844 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import EventHeader from './EventHeader.svelte';
|
import EventHeader from './EventHeader.svelte';
|
||||||
|
import EventNote from './EventNote.svelte';
|
||||||
import { getAccentConfig } from './eventCardConfig';
|
import { getAccentConfig } from './eventCardConfig';
|
||||||
import type { components } from '$lib/generated/api';
|
import type { components } from '$lib/generated/api';
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ let { entry, canWrite = false }: { entry: TimelineEntryDTO; canWrite?: boolean }
|
|||||||
const config = $derived(getAccentConfig(entry));
|
const config = $derived(getAccentConfig(entry));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex justify-center">
|
<div class="flex flex-col items-center">
|
||||||
<div
|
<div
|
||||||
class="inline-flex items-center gap-2 rounded-full bg-surface px-3 py-1 shadow-sm {config.accent ===
|
class="inline-flex items-center gap-2 rounded-full bg-surface px-3 py-1 shadow-sm {config.accent ===
|
||||||
'curated'
|
'curated'
|
||||||
@@ -27,4 +28,5 @@ const config = $derived(getAccentConfig(entry));
|
|||||||
>
|
>
|
||||||
<EventHeader entry={entry} canWrite={canWrite} />
|
<EventHeader entry={entry} canWrite={canWrite} />
|
||||||
</div>
|
</div>
|
||||||
|
<EventNote description={entry.description} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import * as m from '$lib/paraglide/messages.js';
|
import * as m from '$lib/paraglide/messages.js';
|
||||||
import { getAccentConfig, canEditEvent } from './eventCardConfig';
|
import { getAccentConfig, canEditEvent } from './eventCardConfig';
|
||||||
import { timelineDateLabel } from './dateLabel';
|
import { timelineDateLabel } from './dateLabel';
|
||||||
|
import EventNote from './EventNote.svelte';
|
||||||
import type { components } from '$lib/generated/api';
|
import type { components } from '$lib/generated/api';
|
||||||
|
|
||||||
type TimelineEntryDTO = components['schemas']['TimelineEntryDTO'];
|
type TimelineEntryDTO = components['schemas']['TimelineEntryDTO'];
|
||||||
@@ -61,4 +62,5 @@ const canEdit = $derived(canEditEvent(entry, canWrite));
|
|||||||
<span class="sr-only">{m.btn_edit()}</span>
|
<span class="sr-only">{m.btn_edit()}</span>
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
<EventNote description={entry.description} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user