From 249877efe6419f15b482fa93effc6477f29dc3ab Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 25 Sep 2025 00:24:36 -0700 Subject: [PATCH] add sidebar modification display components --- .../modifications/AwakeningDisplay.svelte | 108 +++++++++++ .../DetailsSidebarSegmentedControl.svelte | 79 ++++++++ .../modifications/ModificationSection.svelte | 49 +++++ .../modifications/StatModifierItem.svelte | 83 +++++++++ .../modifications/UncapStatusDisplay.svelte | 172 ++++++++++++++++++ .../modifications/WeaponKeysList.svelte | 157 ++++++++++++++++ 6 files changed, 648 insertions(+) create mode 100644 src/lib/components/sidebar/modifications/AwakeningDisplay.svelte create mode 100644 src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte create mode 100644 src/lib/components/sidebar/modifications/ModificationSection.svelte create mode 100644 src/lib/components/sidebar/modifications/StatModifierItem.svelte create mode 100644 src/lib/components/sidebar/modifications/UncapStatusDisplay.svelte create mode 100644 src/lib/components/sidebar/modifications/WeaponKeysList.svelte diff --git a/src/lib/components/sidebar/modifications/AwakeningDisplay.svelte b/src/lib/components/sidebar/modifications/AwakeningDisplay.svelte new file mode 100644 index 00000000..10517d60 --- /dev/null +++ b/src/lib/components/sidebar/modifications/AwakeningDisplay.svelte @@ -0,0 +1,108 @@ + + +{#if awakeningData && imageUrl} +
+ {displayName} +
+ {displayName} + {#if showLevel && awakeningData.level !== undefined} + Lv{awakeningData.level} + {/if} +
+
+{/if} + + \ No newline at end of file diff --git a/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte b/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte new file mode 100644 index 00000000..5ebfd06e --- /dev/null +++ b/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte @@ -0,0 +1,79 @@ + + +
+ + + Canonical + + {#if hasModifications} + + + User Version + + + {:else} +
+ + User Version + +
+ {/if} +
+
+ + \ No newline at end of file diff --git a/src/lib/components/sidebar/modifications/ModificationSection.svelte b/src/lib/components/sidebar/modifications/ModificationSection.svelte new file mode 100644 index 00000000..5f3d7b95 --- /dev/null +++ b/src/lib/components/sidebar/modifications/ModificationSection.svelte @@ -0,0 +1,49 @@ + + +{#if visible} +
+

{title}

+
+ {@render children()} +
+
+{/if} + + \ No newline at end of file diff --git a/src/lib/components/sidebar/modifications/StatModifierItem.svelte b/src/lib/components/sidebar/modifications/StatModifierItem.svelte new file mode 100644 index 00000000..b92ed662 --- /dev/null +++ b/src/lib/components/sidebar/modifications/StatModifierItem.svelte @@ -0,0 +1,83 @@ + + +
+ {#if icon} + + {/if} + {label} + {value}{suffix} +
+ + \ No newline at end of file diff --git a/src/lib/components/sidebar/modifications/UncapStatusDisplay.svelte b/src/lib/components/sidebar/modifications/UncapStatusDisplay.svelte new file mode 100644 index 00000000..b6e2c444 --- /dev/null +++ b/src/lib/components/sidebar/modifications/UncapStatusDisplay.svelte @@ -0,0 +1,172 @@ + + +
+ {#if showIndicator} +
+ +
+ {/if} + +
+ + + {#if transcendence && transcendenceStep && transcendenceStep > 0} + + {/if} + +
+ Available Upgrades +
+ {#if flb} + = 4}>FLB + {/if} + {#if ulb} + = 5}>ULB + {/if} + {#if transcendence} + 0}>Trans + {/if} + {#if !flb && !ulb && !transcendence} + Standard + {/if} +
+
+
+
+ + \ No newline at end of file diff --git a/src/lib/components/sidebar/modifications/WeaponKeysList.svelte b/src/lib/components/sidebar/modifications/WeaponKeysList.svelte new file mode 100644 index 00000000..37c7aec6 --- /dev/null +++ b/src/lib/components/sidebar/modifications/WeaponKeysList.svelte @@ -0,0 +1,157 @@ + + +{#if weaponKeys && weaponKeys.length > 0} +
+ {#each weaponKeys as key, index} + {@const imageData = keyImages[index]} +
+ {#if imageData} + {imageData.alt} + {/if} +
+ + {getSlotLabel(key.slot, weaponData?.series)} + + + {getKeyDescription(key)} + +
+
+ {/each} +
+{/if} + + \ No newline at end of file