diff --git a/src/components/Tooltip.svelte b/src/components/Tooltip.svelte index f21fdbb7..c0b155a9 100644 --- a/src/components/Tooltip.svelte +++ b/src/components/Tooltip.svelte @@ -31,4 +31,8 @@ @apply p-2 absolute rounded-xl bg-gray-400 border border-gray-800; @apply text-sm text-background z-10; } + + i { + font-style: normal; + } diff --git a/src/data/weaponList.js b/src/data/weaponList.js index 9bd40212..07e5db78 100644 --- a/src/data/weaponList.js +++ b/src/data/weaponList.js @@ -7089,7 +7089,7 @@ export const weaponList = { atk: 42, secondary: 'Energy Recharge', type: weapons.polearm, - source: 'wish', + source: 'fishing trade', ascension: [ { items: [ diff --git a/src/helper.js b/src/helper.js index 9f7b2205..b3a444a3 100644 --- a/src/helper.js +++ b/src/helper.js @@ -5,3 +5,8 @@ export function formatStat(value, type) { return Math.round(value); } + +export const numberFormat = Intl.NumberFormat('en', { + maximumFractionDigits: 1, + minimumFractionDigits: 0, +}); diff --git a/src/routes/weapons/[id].svelte b/src/routes/weapons/[id].svelte index a7a96135..d882589f 100644 --- a/src/routes/weapons/[id].svelte +++ b/src/routes/weapons/[id].svelte @@ -38,21 +38,23 @@ export async function load({ params }) { const { id } = params; const weapon = data[id]; - const materials = weaponList[id].ascension[0].items; + const ascensions = weaponList[id].ascension; + const source = weaponList[id].source; const recommendedCharacter = getCharacter(id); - return { props: { id, weapon, materials, recommendedCharacter } }; + return { props: { id, weapon, recommendedCharacter, source, ascensions } }; } {weapon.name} - Paimon.moe -
+
-
+

{weapon.name}

{#each [...new Array(weapon.rarity)] as _} @@ -101,6 +105,8 @@ {/each}

{$t(`weapon.${weapon.type}`)}

+ +

{source}

{@html weapon.description.replace(/\\n/g, '
')}

{#if weapon.skill.name} @@ -136,57 +142,71 @@
{/if} - -
-
-
- - - - - - {#if weapon.secondary.name} - - {/if} - - {#each showedIndex as index, i} - - {#if [0, 5, 10, 13, 16, 19, 22].includes(i)} - - {/if} - - - {#if weapon.secondary.stats} - - {/if} - - {/each} -
- {$t('weapon.asc')} - - {$t('weapon.lvl')} - - {$t('weapon.baseAtk')} - - {$t(`weapon.${weapon.secondary.name}`)} -
{ascen[i]}{level[i]}{Math.round(weapon.atk[index])} - {formatStat(weapon.secondary.stats[index], weapon.secondary.name)} -
-
-
- -
{weapon.name}
+
+
+ + + + + + {#if weapon.secondary.name} + + {/if} + + + {#each showedIndex as index, i} + + {#if [0, 5, 10, 13, 16, 19, 22].includes(i)} + + {/if} + + + {#if weapon.secondary.stats} + + {/if} + {#if [0, 5, 10, 13, 16, 19, 22].includes(i)} + + {/if} + + {/each} +
+ {$t('weapon.asc')} + + {$t('weapon.lvl')} + + {$t('weapon.baseAtk')} + + {$t(`weapon.${weapon.secondary.name}`)} + + {$t('weapon.ascensionMaterial')} +
{ascen[i]}{level[i]}{Math.round(weapon.atk[index])} + {formatStat(weapon.secondary.stats[index], weapon.secondary.name)} + + + {#if ascen[i] > 0} + {#each ascensions[ascen[i - 1]].items as obj} + + + {obj.item} + {obj.amount} + + + {/each} + + mora + {numberFormat.format(ascensions[ascen[i - 1]].mora)} + + {/if} + +
+
+ +
- - diff --git a/src/routes/weapons/index.svelte b/src/routes/weapons/index.svelte index 4a38d1e9..7f4ea71b 100644 --- a/src/routes/weapons/index.svelte +++ b/src/routes/weapons/index.svelte @@ -139,14 +139,16 @@ - {weapon.type} + + {weapon.type} + {weapon.name} @@ -171,3 +173,10 @@ + + diff --git a/src/service-worker.js b/src/service-worker.js index 6feafa1b..fe2d8a37 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -7,7 +7,7 @@ const IMAGE_CACHE = `cacheimg${IMAGE_CACHE_VER}`; const IMAGE_URL = `${self.location.origin}/images/`; -const changelog = ['Update timeline', 'Update locales']; +const changelog = ['Update timeline', 'Update locales', 'Adjust weapon detail page']; const channel = new BroadcastChannel('paimonmoe-sw');