From dfd542016ec8e61e80d36ee626f689c00f5e36ab Mon Sep 17 00:00:00 2001 From: limina1 Date: Fri, 13 Jun 2025 11:33:12 -0400 Subject: [PATCH] Visual indicators of events loaded Visual indicators: Event kind badges now have colored borders: - Green border = Events loaded (with count shown) - Red border = Not loaded yet 2. Hint text: Added explanations below the badges explaining what the colors mean 3. Event counts: Shows the number of loaded events for each kind in parentheses --- src/lib/components/EventKindFilter.svelte | 24 ++++++++++++++++--- .../navigator/EventNetwork/Settings.svelte | 4 +++- src/lib/navigator/EventNetwork/index.svelte | 1 + 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/lib/components/EventKindFilter.svelte b/src/lib/components/EventKindFilter.svelte index 599d476..1a5f5d9 100644 --- a/src/lib/components/EventKindFilter.svelte +++ b/src/lib/components/EventKindFilter.svelte @@ -4,9 +4,11 @@ import { CloseCircleOutline } from 'flowbite-svelte-icons'; let { - onReload = () => {} + onReload = () => {}, + eventCounts = {} } = $props<{ onReload?: () => void; + eventCounts?: { [kind: number]: number }; }>(); let newKind = $state(''); @@ -76,16 +78,21 @@
{#each $visualizationConfig.allowedKinds as kind} {@const isDisabled = $visualizationConfig.disabledKinds.includes(kind)} + {@const isLoaded = (eventCounts[kind] || 0) > 0} + {@const borderColor = isLoaded ? 'border-green-500' : 'border-red-500'}
+
+

+ + Green border = Events loaded +

+

+ + Red border = Not loaded (click Reload to fetch) +

+
+