From d90d4e76bf939397b3e134266cd9f1e69e791f0d Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 17 Dec 2025 20:07:29 -0800 Subject: [PATCH] tweak notification modal and badge styling fix phantom claims response key, add element colors to badge --- src/lib/api/adapters/crew.adapter.ts | 4 +-- .../components/crew/InvitationsModal.svelte | 14 ++++---- .../components/ui/NotificationBadge.svelte | 35 +++++++++++++++++-- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/src/lib/api/adapters/crew.adapter.ts b/src/lib/api/adapters/crew.adapter.ts index 4d5ca4e9..dcd81693 100644 --- a/src/lib/api/adapters/crew.adapter.ts +++ b/src/lib/api/adapters/crew.adapter.ts @@ -313,11 +313,11 @@ export class CrewAdapter extends BaseAdapter { * Get pending phantom claims for current user (phantoms assigned but not yet confirmed) */ async getPendingPhantomClaims(options?: RequestOptions): Promise { - const response = await this.request<{ phantom_claims: PhantomPlayer[] }>( + const response = await this.request<{ phantomClaims: PhantomPlayer[] }>( '/pending_phantom_claims', options ) - return response.phantom_claims + return response.phantomClaims } } diff --git a/src/lib/components/crew/InvitationsModal.svelte b/src/lib/components/crew/InvitationsModal.svelte index 0f1c41dc..687d9fa6 100644 --- a/src/lib/components/crew/InvitationsModal.svelte +++ b/src/lib/components/crew/InvitationsModal.svelte @@ -114,7 +114,7 @@ - + {#if isLoading} @@ -133,9 +133,7 @@ {#if hasPhantomClaims}

Phantom Assignments

-

- Accept to inherit the phantom's GW scores and join date -

+

Accept to inherit the phantom's GW scores and join date

{#each phantomClaims as phantom} {@const crew = phantom.crew} @@ -187,7 +185,7 @@ {#if hasInvitations}
-

Crew Invitations

+

Crew invites

{#each invitations as invitation} {@const expired = isExpired(invitation.expiresAt)} @@ -299,6 +297,10 @@ } .section { + display: flex; + flex-direction: column; + gap: spacing.$unit-2x; + &:not(:first-child) { margin-top: spacing.$unit-3x; padding-top: spacing.$unit-3x; @@ -307,10 +309,10 @@ } .section-title { - margin: 0 0 spacing.$unit-half 0; font-size: typography.$font-regular; font-weight: typography.$medium; color: var(--text-primary); + margin: 0; } .section-description { diff --git a/src/lib/components/ui/NotificationBadge.svelte b/src/lib/components/ui/NotificationBadge.svelte index 7fa89589..73a4e5be 100644 --- a/src/lib/components/ui/NotificationBadge.svelte +++ b/src/lib/components/ui/NotificationBadge.svelte @@ -1,6 +1,8 @@ {#if count > 0} - + {#if showCount} {count > 99 ? '99+' : count} {/if} @@ -33,7 +41,7 @@ min-width: 8px; height: 8px; border-radius: 50%; - background: colors.$fire-text-20; + background: var(--button-primary-bg); flex-shrink: 0; &.medium { @@ -56,5 +64,26 @@ font-size: 11px; } } + + // Element-specific colors + &.wind { + background: var(--wind-button-bg); + } + &.fire { + background: var(--fire-button-bg); + } + &.water { + background: var(--water-button-bg); + } + &.earth { + background: var(--earth-button-bg); + } + &.light { + background: var(--light-button-bg); + color: black; + } + &.dark { + background: var(--dark-button-bg); + } }