From f4299889814a2269119eee5a17ea15d0b738b61e Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 14 Dec 2025 11:59:35 -0800 Subject: [PATCH] consolidate series pages into single page with tabs --- .../{weapon-series => series}/+page.svelte | 100 ++++++++++++++---- 1 file changed, 79 insertions(+), 21 deletions(-) rename src/routes/(app)/database/{weapon-series => series}/+page.svelte (53%) diff --git a/src/routes/(app)/database/weapon-series/+page.svelte b/src/routes/(app)/database/series/+page.svelte similarity index 53% rename from src/routes/(app)/database/weapon-series/+page.svelte rename to src/routes/(app)/database/series/+page.svelte index b98f500d..5d423aef 100644 --- a/src/routes/(app)/database/weapon-series/+page.svelte +++ b/src/routes/(app)/database/series/+page.svelte @@ -3,18 +3,55 @@
- {#if seriesQuery.isPending} -
Loading weapon series...
- {:else if seriesQuery.error} -
Failed to load weapon series
- {:else if seriesQuery.data} + + + {#if activeQuery.isPending} +
Loading {activeType} series...
+ {:else if activeQuery.error} +
Failed to load {activeType} series
+ {:else if sortedData.length > 0}
@@ -23,28 +60,34 @@ - + {#if hasFlags} + + {/if} - {#each seriesQuery.data.sort((a, b) => a.order - b.order) as series (series.id)} + {#each sortedData as series (series.id)} - + {#if hasFlags && 'extra' in series} + + {/if} {/each}
Name (EN) Name (JA) SlugFlagsFlags
{series.order} {series.name.en} {series.name.ja} {series.slug} - {#if series.extra}Extra{/if} - {#if series.elementChangeable}Element{/if} - {#if series.hasWeaponKeys}Keys{/if} - {#if series.hasAwakening}Awaken{/if} - {#if series.hasAxSkills}AX{/if} - + {#if series.extra}Extra{/if} + {#if series.elementChangeable}Element{/if} + {#if series.hasWeaponKeys}Keys{/if} + {#if series.hasAwakening}Awaken{/if} + {#if series.hasAxSkills}AX{/if} +
+ {:else} +
No {activeType} series found
{/if}
@@ -69,8 +112,17 @@ overflow: hidden; } + .series-nav { + display: flex; + align-items: center; + gap: spacing.$unit-2x; + padding: spacing.$unit-2x; + border-bottom: 1px solid var(--border-subtle); + } + .loading, - .error { + .error, + .empty { padding: spacing.$unit-4x; text-align: center; color: colors.$grey-50; @@ -100,8 +152,6 @@ font-weight: typography.$medium; font-size: typography.$font-small; color: colors.$grey-40; - text-transform: uppercase; - letter-spacing: 0.5px; } td { @@ -114,7 +164,7 @@ } .name { - min-width: 280px; + min-width: 200px; } .name-ja { @@ -144,7 +194,15 @@ } &.element { - background: linear-gradient(to right, #fecaca, #fef08a, #bbf7d0, #bfdbfe, #e9d5ff, #fbcfe8); + background: linear-gradient( + to right, + #fecaca, + #fef08a, + #bbf7d0, + #bfdbfe, + #e9d5ff, + #fbcfe8 + ); color: #374151; }