diff --git a/src/lib/components/DescriptionRenderer.svelte b/src/lib/components/DescriptionRenderer.svelte new file mode 100644 index 00000000..eff84c90 --- /dev/null +++ b/src/lib/components/DescriptionRenderer.svelte @@ -0,0 +1,276 @@ + + +
+ {@html parsedHTML} +
+ + \ No newline at end of file diff --git a/src/lib/components/sidebar/DescriptionSidebar.svelte b/src/lib/components/sidebar/DescriptionSidebar.svelte new file mode 100644 index 00000000..3c7c8a75 --- /dev/null +++ b/src/lib/components/sidebar/DescriptionSidebar.svelte @@ -0,0 +1,138 @@ + + +
+
+ {#if title} +
+

{title}

+
+ {/if} + + {#if description} +
+ +
+ {:else} +
+

No description available for this party.

+ {#if canEdit} + + {/if} +
+ {/if} +
+ + {#if canEdit && description} +
+ +
+ {/if} +
+ + \ No newline at end of file diff --git a/src/lib/components/sidebar/DetailsSidebar.svelte b/src/lib/components/sidebar/DetailsSidebar.svelte new file mode 100644 index 00000000..cbe1426a --- /dev/null +++ b/src/lib/components/sidebar/DetailsSidebar.svelte @@ -0,0 +1,441 @@ + + +
+
+ {displayName(itemData)} +
+

{displayName(itemData)}

+ {#if itemData?.granblueId} + ID: {itemData.granblueId} + {/if} +
+
+ +
+

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} +
+ + \ No newline at end of file diff --git a/src/lib/components/ui/Sidebar.svelte b/src/lib/components/ui/Sidebar.svelte index c61e9713..fe2b10fb 100644 --- a/src/lib/components/ui/Sidebar.svelte +++ b/src/lib/components/ui/Sidebar.svelte @@ -18,20 +18,10 @@ headerActions?: Snippet } - const { - open = false, - title, - onclose, - children, - headerActions - }: Props = $props() + const { open = false, title, onclose, children, headerActions }: Props = $props() -