From 2b572d07a7efdda119de1959d867fe48659dfdb3 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Wed, 3 Dec 2025 16:22:33 -0800 Subject: [PATCH] add artifact selection components for pane stack --- .../sidebar/ArtifactSelectionPane.svelte | 374 ++++++++++++++++++ .../sidebar/CharacterArtifactSection.svelte | 87 ++++ 2 files changed, 461 insertions(+) create mode 100644 src/lib/components/sidebar/ArtifactSelectionPane.svelte create mode 100644 src/lib/components/sidebar/CharacterArtifactSection.svelte diff --git a/src/lib/components/sidebar/ArtifactSelectionPane.svelte b/src/lib/components/sidebar/ArtifactSelectionPane.svelte new file mode 100644 index 00000000..2660a1e2 --- /dev/null +++ b/src/lib/components/sidebar/ArtifactSelectionPane.svelte @@ -0,0 +1,374 @@ + + + + +
+ +
+ +
+ + +
+ {#if isLoading} +
+ +

Loading artifacts...

+
+ {:else if isEmpty} +
+ +

No artifacts in collection

+
+ {:else} + {#each allArtifacts as artifact (artifact.id)} + {@const isEquipped = artifact.id === currentArtifactId} + {@const imageUrl = getArtifactImage(artifact.artifact?.granblueId)} + {@const displayName = getDisplayName(artifact)} + {@const proficiency = getProficiency(artifact)} + {@const gradeLetter = artifact.grade?.letter} + + + + {/if} + + {/each} + + {#if showSentinel} +
+ {/if} + + {#if collectionQuery.isFetchingNextPage} +
+ + Loading more... +
+ {/if} + {/if} +
+
+ + diff --git a/src/lib/components/sidebar/CharacterArtifactSection.svelte b/src/lib/components/sidebar/CharacterArtifactSection.svelte new file mode 100644 index 00000000..d4065c46 --- /dev/null +++ b/src/lib/components/sidebar/CharacterArtifactSection.svelte @@ -0,0 +1,87 @@ + + + + +
+ {#if hasArtifact && artifact} + + + {#if editable} +
+ + +
+ {/if} + {:else if editable} + + {:else} +

No artifact equipped

+ {/if} +
+ +