diff --git a/src/lib/components/sidebar/DetailsSidebar.svelte b/src/lib/components/sidebar/DetailsSidebar.svelte index 70206c04..973fcad3 100644 --- a/src/lib/components/sidebar/DetailsSidebar.svelte +++ b/src/lib/components/sidebar/DetailsSidebar.svelte @@ -1,31 +1,12 @@
-
- {displayName(itemData)} -
+ {#if selectedView === 'canonical'} -
-
-

Basic Information

-
- Rarity - {getRarityLabel(itemData?.rarity)} +
+ + +
-
- Element - {getElementLabel(itemData?.element)} -
- - {#if type === 'character'} - {#if itemData?.race && itemData.race.length > 0} -
- Race - - {itemData.race - .map((r) => getRaceLabel(r)) - .filter(Boolean) - .join(', ') || '—'} - -
- {/if} -
- Gender - {getGenderLabel(itemData?.gender)} -
- {#if itemData?.proficiency && itemData.proficiency.length > 0} -
- Proficiencies - - {itemData.proficiency - .map((p) => getProficiencyLabel(p)) - .filter(Boolean) - .join(', ') || '—'} - -
- {/if} - {:else if type === 'weapon'} -
- Proficiency - {getProficiencyLabel(itemData?.proficiency?.[0])} -
- {/if} -
- -
-

Uncap Status

-
- -
-
- Current Uncap - {gridUncapLevel ?? 0}★ -
- {#if gridTranscendence && gridTranscendence > 0} -
- Transcendence - Stage {gridTranscendence} -
- {/if} - {#if itemData?.uncap} -
- Available Uncaps - - {[ - itemData.uncap.flb && 'FLB', - itemData.uncap.ulb && 'ULB', - itemData.uncap.transcendence && 'Transcendence' - ] - .filter(Boolean) - .join(', ') || 'Standard'} - -
- {/if} -
- -
-

Stats

- {#if itemData?.hp} -
-

HP

-
- Base - {itemData.hp.minHp ?? '—'} -
-
- Max - {itemData.hp.maxHp ?? '—'} -
- {#if itemData.uncap?.flb && itemData.hp.maxHpFlb} -
- Max (FLB) - {itemData.hp.maxHpFlb} -
- {/if} - {#if itemData.uncap?.ulb && itemData.hp.maxHpUlb} -
- Max (ULB) - {itemData.hp.maxHpUlb} -
- {/if} -
- {/if} - - {#if itemData?.atk} -
-

Attack

-
- Base - {itemData.atk.minAtk ?? '—'} -
-
- Max - {itemData.atk.maxAtk ?? '—'} -
- {#if itemData.uncap?.flb && itemData.atk.maxAtkFlb} -
- Max (FLB) - {itemData.atk.maxAtkFlb} -
- {/if} - {#if itemData.uncap?.ulb && itemData.atk.maxAtkUlb} -
- Max (ULB) - {itemData.atk.maxAtkUlb} -
- {/if} -
- {/if} -
- - {#if type === 'weapon' && itemData?.weaponSkills && itemData.weaponSkills.length > 0} -
-

Skills

-
- {#each itemData.weaponSkills as skill} -
-

{displayName(skill) || 'Unknown Skill'}

- {#if skill.description} -

{skill.description}

- {/if} -
- {/each} -
-
- {/if} - - {#if type === 'summon' && itemData?.summonAuras && itemData.summonAuras.length > 0} -
-

Auras

-
- {#each itemData.summonAuras as aura} -
-

{displayName(aura) || 'Unknown Aura'}

- {#if aura.description} -

{aura.description}

- {/if} -
- {/each} -
-
- {/if} - - {#if type === 'weapon' && itemData?.weaponKeys && itemData.weaponKeys.length > 0} -
-

Weapon Keys

-
- {#each itemData.weaponKeys as key} -
- Slot {key.slot} - {displayName(key.weaponKey1) || '—'} -
- {/each} -
-
- {/if} - - {#if type === 'character' && itemData?.special} -
-
- Special Character - -
-
- {/if} -
{:else} -
- - - - - {#if type === 'character'} - {@const char = item as GridCharacter} - - {#if modificationStatus.hasAwakening} - - - - {/if} - - {#if modificationStatus.hasRings} - - {#each (char.over_mastery || []) as ring} - - {/each} - - {/if} - - {#if modificationStatus.hasEarring} - {@const earring = char.aetherial_mastery} - {#if earring} - - - - {/if} - {/if} - - {#if modificationStatus.hasPerpetuity} - - - - {/if} - - {:else if type === 'weapon'} - {@const weapon = item as GridWeapon} - - {#if modificationStatus.hasAwakening && weapon.awakening} - - - - {/if} - - {#if modificationStatus.hasWeaponKeys} - - - - {/if} - - {#if modificationStatus.hasAxSkills && weapon.ax} - - {#each weapon.ax as axSkill} - - {/each} - - {/if} - - {#if modificationStatus.hasElement && weapon.element} - - - - {/if} - - {:else if type === 'summon'} - {@const summon = item as GridSummon} - - {#if modificationStatus.hasQuickSummon || modificationStatus.hasFriendSummon} - - {#if summon.quickSummon} - - {/if} - {#if summon.friend} - - {/if} - - {/if} - {/if} - - -
- Rarity - {getRarityLabel(itemData?.rarity)} -
-
- Element - {getElementLabel(itemData?.element)} -
- - {#if type === 'character'} - {#if itemData?.race && itemData.race.length > 0} -
- Race - - {itemData.race - .map((r) => getRaceLabel(r)) - .filter(Boolean) - .join(', ') || '—'} - -
- {/if} -
- Gender - {getGenderLabel(itemData?.gender)} -
- {:else if type === 'weapon'} -
- Proficiency - {getProficiencyLabel(itemData?.proficiency?.[0])} -
- {/if} -
-
+ {/if}
@@ -497,146 +83,9 @@ gap: spacing.$unit-2x; } - .item-header { - display: flex; - gap: spacing.$unit-2x; - align-items: flex-start; - border-radius: layout.$item-corner; - border: 1px solid colors.$grey-70; - justify-content: center; - transition: background 0.3s ease; - - .item-image.weapon { - width: 62%; - } - - .item-image.summon, - .item-image.character { - width: 100%; - } - } - - .details-section { - margin-bottom: spacing.$unit-3x; - - h3 { - margin: 0 0 calc(spacing.$unit * 1.5) 0; - font-size: typography.$font-regular; - font-weight: typography.$medium; - color: var(--text-secondary, colors.$grey-40); - text-transform: uppercase; - letter-spacing: 0.5px; - } - - h4 { - margin: spacing.$unit 0 calc(spacing.$unit * 0.5) 0; - font-size: typography.$font-regular; - font-weight: typography.$medium; - color: var(--text-primary, colors.$grey-20); - } - } - - .detail-row { - display: flex; - justify-content: space-between; - align-items: center; - padding: calc(spacing.$unit * 0.75) 0; - border-bottom: 1px solid rgba(colors.$grey-70, 0.5); - - &:last-child { - border-bottom: none; - } - - .label { - font-size: typography.$font-regular; - color: var(--text-secondary, colors.$grey-50); - } - - .value { - font-size: typography.$font-regular; - color: var(--text-primary, colors.$grey-10); - font-weight: typography.$medium; - text-align: right; - } - } - - .uncap-display { - margin-bottom: calc(spacing.$unit * 1.5); - padding: spacing.$unit; - background: colors.$grey-90; - border-radius: calc(layout.$item-corner * 0.5); - display: flex; - justify-content: center; - } - - .stats-group { - margin-bottom: spacing.$unit-2x; - - &:last-child { - margin-bottom: 0; - } - } - - .skills-list, - .auras-list { - .skill-item, - .aura-item { - padding: spacing.$unit; - background: colors.$grey-90; - border-radius: calc(layout.$item-corner * 0.5); - margin-bottom: spacing.$unit; - - h4 { - margin: 0 0 calc(spacing.$unit * 0.5) 0; - font-size: typography.$font-regular; - color: var(--text-primary, colors.$grey-10); - } - - p { - margin: 0; - font-size: typography.$font-small; - color: var(--text-secondary, colors.$grey-50); - line-height: 1.4; - } - } - } - - .keys-list { - .key-item { - display: flex; - justify-content: space-between; - padding: calc(spacing.$unit * 0.75); - background: colors.$grey-90; - border-radius: calc(layout.$item-corner * 0.5); - margin-bottom: calc(spacing.$unit * 0.5); - - .key-slot { - font-size: typography.$font-small; - color: var(--text-secondary, colors.$grey-50); - } - - .key-name { - font-size: typography.$font-small; - color: var(--text-primary, colors.$grey-10); - font-weight: typography.$medium; - } - } - } - - .special-indicator { - .value { - color: var(--color-success, #4caf50); - font-size: typography.$font-large; - } - } - - .canonical-view, - .user-version-view { - padding: 0 spacing.$unit-2x spacing.$unit-2x; - } - - .user-version-view { + .canonical-view { display: flex; + position: relative; flex-direction: column; gap: spacing.$unit-2x; } diff --git a/src/lib/components/sidebar/details/BasicInfoSection.svelte b/src/lib/components/sidebar/details/BasicInfoSection.svelte new file mode 100644 index 00000000..58c8abad --- /dev/null +++ b/src/lib/components/sidebar/details/BasicInfoSection.svelte @@ -0,0 +1,107 @@ + + +
+

Basic Information

+
+ Rarity + {getRarityLabel(itemData?.rarity)} +
+
+ Element + {getElementLabel(itemData?.element)} +
+ + {#if type === 'character'} + {#if itemData?.race && itemData.race.length > 0} +
+ Race + + {itemData.race + .map((r) => getRaceLabel(r)) + .filter(Boolean) + .join(', ') || '—'} + +
+ {/if} +
+ Gender + {getGenderLabel(itemData?.gender)} +
+ {#if itemData?.proficiency && itemData.proficiency.length > 0} +
+ Proficiencies + + {itemData.proficiency + .map((p) => getProficiencyLabel(p)) + .filter(Boolean) + .join(', ') || '—'} + +
+ {/if} + {:else if type === 'weapon'} +
+ Proficiency + {getProficiencyLabel(itemData?.proficiency)} +
+ {/if} +
+ + diff --git a/src/lib/components/sidebar/details/ItemHeader.svelte b/src/lib/components/sidebar/details/ItemHeader.svelte new file mode 100644 index 00000000..654de54b --- /dev/null +++ b/src/lib/components/sidebar/details/ItemHeader.svelte @@ -0,0 +1,128 @@ + + +
+
+
+ +
+ {displayName(itemData)} +
+
+ + diff --git a/src/lib/components/sidebar/details/SkillsSection.svelte b/src/lib/components/sidebar/details/SkillsSection.svelte new file mode 100644 index 00000000..13685a51 --- /dev/null +++ b/src/lib/components/sidebar/details/SkillsSection.svelte @@ -0,0 +1,169 @@ + + +{#if type === 'weapon' && itemData?.weaponSkills && itemData.weaponSkills.length > 0} +
+

Skills

+
+ {#each itemData.weaponSkills as skill} +
+

{displayName(skill) || 'Unknown Skill'}

+ {#if skill.description} +

{skill.description}

+ {/if} +
+ {/each} +
+
+{/if} + +{#if type === 'summon' && itemData?.summonAuras && itemData.summonAuras.length > 0} +
+

Auras

+
+ {#each itemData.summonAuras as aura} +
+

{displayName(aura) || 'Unknown Aura'}

+ {#if aura.description} +

{aura.description}

+ {/if} +
+ {/each} +
+
+{/if} + +{#if type === 'weapon' && itemData?.weaponKeys && itemData.weaponKeys.length > 0} +
+

Weapon Keys

+
+ {#each itemData.weaponKeys as key} +
+ Slot {key.slot} + {displayName(key.weaponKey1) || '—'} +
+ {/each} +
+
+{/if} + +{#if type === 'character' && itemData?.special} +
+
+ Special Character + +
+
+{/if} + + \ No newline at end of file diff --git a/src/lib/components/sidebar/details/StatsSection.svelte b/src/lib/components/sidebar/details/StatsSection.svelte new file mode 100644 index 00000000..75c9d152 --- /dev/null +++ b/src/lib/components/sidebar/details/StatsSection.svelte @@ -0,0 +1,176 @@ + + +
+ {#if itemData?.hp && itemData?.atk} +
+
+
HP
+
ATK
+ +
Base
+
{itemData.hp.minHp ?? '—'}
+
{itemData.atk.minAtk ?? '—'}
+ +
MLB
+
{itemData.hp.maxHp ?? '—'}
+
{itemData.atk.maxAtk ?? '—'}
+ + {#if itemData.uncap?.flb && (itemData.hp.maxHpFlb || itemData.atk.maxAtkFlb)} +
FLB
+
{itemData.hp.maxHpFlb ?? '—'}
+
{itemData.atk.maxAtkFlb ?? '—'}
+ {/if} + + {#if itemData.uncap?.ulb && (itemData.hp.maxHpUlb || itemData.atk.maxAtkUlb)} +
ULB
+
{itemData.hp.maxHpUlb ?? '—'}
+
{itemData.atk.maxAtkUlb ?? '—'}
+ {/if} + + {#if gridTranscendence && gridTranscendence > 0} +
T5
+
{itemData.hp.maxHpXlb ?? '—'}
+
{itemData.atk.maxAtkXlb ?? '—'}
+ {/if} +
+ {/if} +
+ + diff --git a/src/lib/components/sidebar/details/TeamView.svelte b/src/lib/components/sidebar/details/TeamView.svelte new file mode 100644 index 00000000..5dcbcea8 --- /dev/null +++ b/src/lib/components/sidebar/details/TeamView.svelte @@ -0,0 +1,155 @@ + + +
+ + + + + {#if type === 'character'} + {@const char = item as GridCharacter} + + {#if modificationStatus.hasAwakening} + + + + {/if} + + {#if modificationStatus.hasRings || modificationStatus.hasEarring} + + + + {/if} + + {#if modificationStatus.hasPerpetuity} + + + + {/if} + {:else if type === 'weapon'} + {@const weapon = item as GridWeapon} + + {#if modificationStatus.hasAwakening && weapon.awakening} + + + + {/if} + + {#if modificationStatus.hasWeaponKeys} + + + + {/if} + + {#if modificationStatus.hasAxSkills && weapon.ax} + + {#each weapon.ax as axSkill} + + {/each} + + {/if} + + {#if modificationStatus.hasElement && weapon.element} + + + + {/if} + {:else if type === 'summon'} + {@const summon = item as GridSummon} + + {#if modificationStatus.hasQuickSummon || modificationStatus.hasFriendSummon} + + {#if summon.quickSummon} + + {/if} + {#if summon.friend} + + {/if} + + {/if} + {/if} +
+ + diff --git a/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte b/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte index 5ebfd06e..4814e043 100644 --- a/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte +++ b/src/lib/components/sidebar/modifications/DetailsSidebarSegmentedControl.svelte @@ -1,79 +1,64 @@ -
- - - Canonical - - {#if hasModifications} - - - User Version - - - {:else} -
- - User Version - -
- {/if} -
-
+{#if hasModifications} +
+ + This team + Stats + +
+{/if} \ No newline at end of file + .disabled-segment { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + padding: spacing.$unit; + background: colors.$grey-90; + border-radius: spacing.$unit-half; + cursor: not-allowed; + user-select: none; + } +