From 4c48296045b76126e6a9ffbce388a7f0b6d92675 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Mon, 5 Jan 2026 00:37:36 -0800 Subject: [PATCH] implement crew teams page with shared parties list --- src/routes/(app)/crew/teams/+page.svelte | 145 ++++++++++++++++++++++- 1 file changed, 141 insertions(+), 4 deletions(-) diff --git a/src/routes/(app)/crew/teams/+page.svelte b/src/routes/(app)/crew/teams/+page.svelte index 9ff429e1..3eede1d1 100644 --- a/src/routes/(app)/crew/teams/+page.svelte +++ b/src/routes/(app)/crew/teams/+page.svelte @@ -1,9 +1,16 @@ @@ -27,8 +58,53 @@ -
-

Coming soon

+
+ {#if !crewStore.isInCrew} +
+ +

You're not in a crew

+
+ {:else if sharedPartiesQuery.isLoading} +
+ +

Loading shared teams...

+
+ {:else if sharedPartiesQuery.isError} +
+ +

Failed to load teams: {sharedPartiesQuery.error?.message || 'Unknown error'}

+ +
+ {:else if isEmpty} +
+ +

No teams have been shared with your crew yet

+ Crew members can share their teams from the team settings +
+ {:else} +
+ + +
+ + {#if sharedPartiesQuery.isFetchingNextPage} +
+ + Loading more... +
+ {/if} + + {#if !sharedPartiesQuery.hasNextPage && items.length > 0} +
+

You've seen all shared teams

+
+ {/if} +
+ {/if}
@@ -52,17 +128,78 @@ overflow: hidden; } - .empty-state { + .content { + padding: spacing.$unit-2x; + } + + .teams-grid { + display: flex; + flex-direction: column; + gap: spacing.$unit-2x; + } + + .empty-state, + .loading-state, + .error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; - padding: spacing.$unit-4x; + padding: spacing.$unit-6x spacing.$unit-4x; color: var(--text-secondary); + text-align: center; + gap: spacing.$unit; + + p { + margin: 0; + font-size: typography.$font-regular; + } + + .hint { + font-size: typography.$font-small; + color: var(--text-tertiary); + } + } + + .loading-more { + display: flex; + align-items: center; + justify-content: center; + gap: spacing.$unit; + padding: spacing.$unit-2x; + color: var(--text-secondary); + font-size: typography.$font-small; + } + + .end-message { + text-align: center; + padding: spacing.$unit-2x; + color: var(--text-tertiary); font-size: typography.$font-small; p { margin: 0; } } + + .load-more-sentinel { + height: 1px; + + &.hidden { + display: none; + } + } + + :global(.spin) { + animation: spin 1s linear infinite; + } + + @keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } + }