From bfe776b33108531dbba81488b930f340b622a8da Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Jul 2026 18:22:53 +0000 Subject: [PATCH] Move More>> toggle to edit-only, show source count instead of names in list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The row view now shows "N sources active" instead of listing every attached source's name, and the "More »" spillover checkbox only appears in the edit panel — it's no longer duplicated inline on every row. --- .../src/lib/components/admin/EventsTab.svelte | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/frontend/src/lib/components/admin/EventsTab.svelte b/frontend/src/lib/components/admin/EventsTab.svelte index e91ee52..1f46211 100644 --- a/frontend/src/lib/components/admin/EventsTab.svelte +++ b/frontend/src/lib/components/admin/EventsTab.svelte @@ -23,10 +23,6 @@ } let editForm = $state(emptyEditForm()); - function sourceNames(ids: string[]) { - return ids.map((id) => sources.find((s) => s.id === id)?.name).filter(Boolean).join(', ') || 'No sources assigned'; - } - async function handleAdd() { if (!newEvent.name) return; const created = await addEvent({ @@ -48,13 +44,6 @@ events = events.map((e) => (e.id === event.id ? updated : e)); } - // Same "More »" collapse as Category.isSpillover (see MergeTab.svelte) — an item - // marked here loses its own top-nav tab and shows up on /more instead. - async function toggleSpillover(event: AdminTrackedEvent) { - const updated = await updateEvent(event.id, { isSpillover: !event.isSpillover }); - events = events.map((e) => (e.id === event.id ? updated : e)); - } - async function handleDelete(id: string) { await deleteEvent(id); events = events.filter((e) => e.id !== id); @@ -203,7 +192,7 @@
{event.name}
- {sourceNames(event.sourceIds)} + {event.sourceIds.length} source{event.sourceIds.length === 1 ? '' : 's'} active {#if event.keywords.length > 0} · matching {event.keywords.map((k) => `"${k}"`).join(', ')} {/if} @@ -211,10 +200,6 @@ {event.recapIntervalHours === null ? 'no recaps' : `recap every ${event.recapIntervalHours}h`}
- toggleActive(event)} role="button" tabindex="0"> {event.active ? 'Active' : 'Paused'}