-
-
-
})
{ e.currentTarget.src = '/images/placeholders/placeholder-summon-main.png' }}
- />
-
-
-
{getSummonName(summon.name)}
-
-
-
+
-
-
Stats
-
-
- Base HP:
- {summon.base_hp || '—'}
-
-
- Base Attack:
- {summon.base_attack || '—'}
-
-
- Max HP:
- {summon.max_hp || '—'}
-
-
- Max Attack:
- {summon.max_attack || '—'}
-
-
- Plus Bonus:
- {summon.plus_bonus ? 'Yes' : 'No'}
-
-
- Series:
- {summon.series || '—'}
-
-
-
+
+
+
+ {#if flb}
+
+ {/if}
+ {#if ulb}
+
+ {/if}
+ {#if transcendence}
+
+ {/if}
+
+
+
+
+
+ {#if flb}
+
+ {/if}
+ {#if ulb}
+
+ {/if}
+ {#if transcendence}
+
+ {/if}
+
+
+
+
+ {#if summon.uncap}
+
+
+
+ {/if}
+
Call Effect
@@ -159,22 +140,22 @@
diff --git a/src/routes/database/weapons/[id]/+page.svelte b/src/routes/database/weapons/[id]/+page.svelte
index 67804650..db259a84 100644
--- a/src/routes/database/weapons/[id]/+page.svelte
+++ b/src/routes/database/weapons/[id]/+page.svelte
@@ -5,6 +5,10 @@
import { getRarityLabel } from '$lib/utils/rarity'
import { getElementLabel, getElementIcon } from '$lib/utils/element'
import { getProficiencyLabel, getProficiencyIcon } from '$lib/utils/proficiency'
+ import UncapIndicator from '$lib/components/uncap/UncapIndicator.svelte'
+ import DetailsContainer from '$lib/components/ui/DetailsContainer.svelte'
+ import DetailItem from '$lib/components/ui/DetailItem.svelte'
+ import DetailsHeader from '$lib/components/ui/DetailsHeader.svelte'
import type { PageData } from './$types'
let { data }: { data: PageData } = $props()
@@ -12,123 +16,78 @@
// Get weapon from server data
const weapon = $derived(data.weapon)
- // Helper function to get weapon name
- function getWeaponName(nameObj: any): string {
- if (!nameObj) return 'Unknown Weapon'
- if (typeof nameObj === 'string') return nameObj
- return nameObj.en || nameObj.ja || 'Unknown Weapon'
- }
-
// Helper function to get weapon image
function getWeaponImage(weapon: any): string {
if (!weapon?.granblue_id) return '/images/placeholders/placeholder-weapon-main.png'
// Handle element-specific weapons (primal weapons)
if (weapon.element === 0 && weapon.instance_element) {
- return `/images/weapon-main/${weapon.granblue_id}_${weapon.instance_element}.jpg`
+ return `/images/weapon-grid/${weapon.granblue_id}_${weapon.instance_element}.jpg`
}
- return `/images/weapon-main/${weapon.granblue_id}.jpg`
+ return `/images/weapon-grid/${weapon.granblue_id}.jpg`
}
+
+ // Calculate uncap properties for the indicator
+ const uncap = $derived(weapon?.uncap ?? {})
+ const flb = $derived(uncap.flb ?? false)
+ const ulb = $derived(uncap.ulb ?? false)
+ const transcendence = $derived(uncap.transcendence ?? false)
+
+ // Calculate maximum uncap level based on available uncaps
+ // Weapons: 3 base + FLB + ULB + transcendence
+ const getMaxUncapLevel = () => {
+ return transcendence ? 6 : ulb ? 5 : flb ? 4 : 3
+ }
+
+ const uncapLevel = $derived(getMaxUncapLevel())
+ // For details view, show maximum transcendence stage when available
+ const transcendenceStage = $derived(transcendence ? 5 : 0)
-
-
{#if weapon}
-
-
-
})
{
- e.currentTarget.src = '/images/placeholders/placeholder-weapon-main.png'
- }}
- />
-
-
-
{getWeaponName(weapon.name)}
-
-
-
+
-
-
Stats
-
-
- Base HP:
- {weapon.base_hp || '—'}
-
-
- Base Attack:
- {weapon.base_attack || '—'}
-
-
- Max HP:
- {weapon.max_hp || '—'}
-
-
- Max Attack:
- {weapon.max_attack || '—'}
-
-
- Skill Level Cap:
- {weapon.skill_level_cap || '—'}
-
-
- Plus Bonus:
- {weapon.plus_bonus ? 'Yes' : 'No'}
-
-
-
+
+
+
+ {#if weapon.uncap}
+
+
+
+ {/if}
+
+
+
+
+
+ {#if flb}
+
+ {/if}
+ {#if ulb}
+
+ {/if}
+
+
+
+
+
+ {#if flb}
+
+ {/if}
+ {#if ulb}
+
+ {/if}
+
Skills
@@ -156,17 +115,17 @@