diff --git a/frontend/src/routes/dashboard/channels/+page.svelte b/frontend/src/routes/dashboard/channels/+page.svelte index 2eb60a4..08b8c82 100644 --- a/frontend/src/routes/dashboard/channels/+page.svelte +++ b/frontend/src/routes/dashboard/channels/+page.svelte @@ -94,6 +94,21 @@ return PROVIDERS.find((p) => p.value === value)?.label ?? value; } + // Per-provider color palette — [text, bg, border, stripe] + const PROVIDER_COLORS: Record = { + discord: { text: '#8b9cef', bg: 'rgba(88,101,242,0.12)', border: 'rgba(88,101,242,0.3)' }, + slack: { text: '#d4a0c0', bg: 'rgba(180,120,160,0.10)', border: 'rgba(180,120,160,0.3)' }, + teams: { text: '#a78bda', bg: 'rgba(120,90,200,0.10)', border: 'rgba(120,90,200,0.3)' }, + googlechat: { text: '#6ec07a', bg: 'rgba(60,176,80,0.10)', border: 'rgba(60,176,80,0.25)' }, + telegram: { text: '#6cb8d9', bg: 'rgba(42,171,226,0.10)', border: 'rgba(42,171,226,0.25)' }, + matrix: { text: '#6bccc4', bg: 'rgba(80,200,190,0.10)', border: 'rgba(80,200,190,0.25)' }, + webhook: { text: 'var(--color-text-secondary)', bg: 'rgba(255,255,255,0.04)', border: 'var(--color-border-mid)' }, + }; + + function providerColor(provider: string): typeof PROVIDER_COLORS['discord'] { + return PROVIDER_COLORS[provider] ?? PROVIDER_COLORS['webhook']; + } + function fieldLabel(field: string): string { return field.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase()); } @@ -338,13 +353,13 @@
-
+

Channels

-

- Route capsule events to Discord, Slack, Telegram, and other destinations. -

+ {#if !loading && channels.length > 0} + {channels.length} + {/if}
+

+ Route capsule events to Discord, Slack, Telegram, and other destinations. +

@@ -432,13 +450,6 @@
{:else} - -
- - {channels.length} {channels.length === 1 ? 'channel' : 'channels'} total - -
-
@@ -457,7 +468,7 @@ in:fly={{ y: 6, duration: 350, delay: i * 40, easing: cubicOut }} out:fly={{ x: -12, duration: 180, easing: cubicIn }} > -
+
@@ -467,7 +478,10 @@
- + {@render providerIcon(ch.provider)} {providerLabel(ch.provider)} @@ -687,9 +701,11 @@ style="animation: fadeUp 0.12s ease both" > {#each PROVIDERS as p} + {@const ppc = providerColor(p.value)}