diff options
| author | mat <github@matdoes.dev> | 2022-03-27 17:48:35 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-03-27 17:48:35 -0500 |
| commit | 13125a56267f2a88ed0a38833ea6bc1a7e64775c (patch) | |
| tree | f4966310f9a2fb76a9072a79e92eb32b6a65f795 /src/routes | |
| parent | c76570072611b61aaf8f0db5f6870ffaf4e6d422 (diff) | |
| download | skyblock-stats-13125a56267f2a88ed0a38833ea6bc1a7e64775c.tar.gz skyblock-stats-13125a56267f2a88ed0a38833ea6bc1a7e64775c.tar.bz2 skyblock-stats-13125a56267f2a88ed0a38833ea6bc1a7e64775c.zip | |
Add harp
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/player/[player]/[profile].svelte | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/routes/player/[player]/[profile].svelte b/src/routes/player/[player]/[profile].svelte index 4d4761b..ce27635 100644 --- a/src/routes/player/[player]/[profile].svelte +++ b/src/routes/player/[player]/[profile].svelte @@ -48,6 +48,7 @@ import { cleanId } from '$lib/utils' import Head from '$lib/Head.svelte' import Toc from '$lib/Toc.svelte' + import Harp from '$lib/sections/Harp.svelte' export let data: CleanMemberProfile export let pack: MatcherFile @@ -61,12 +62,13 @@ if (data.member.stats?.find(s => s.category === 'fishing')) categories.push('fishing') if (data.member.stats?.find(s => s.category === 'races')) categories.push('races') categories.push('misc') - categories.push('minions') - if (data.member.slayers) categories.push('slayers') + if (data.member.minions.some(m => m.levels.some(l => l))) categories.push('minions') + if (data.member.slayers && data.member.slayers.xp > 0) categories.push('slayers') categories.push('zones') if (data.member.collections && data.member.collections.length > 0) categories.push('collections') if (data.profile.bank.balance !== undefined) categories.push('bank') + if (data.member.harp.selected !== null) categories.push('harp') categories.push('leaderboards') } @@ -160,12 +162,14 @@ {/if} {/each} {/if} - <section> - <Collapsible id="minions"> - <h2 slot="title">Minions</h2> - <Minions {data} /> - </Collapsible> - </section> + {#if categories.includes('minions')} + <section> + <Collapsible id="minions"> + <h2 slot="title">Minions</h2> + <Minions {data} /> + </Collapsible> + </section> + {/if} {#if categories.includes('slayers')} <section> <Collapsible id="slayers"> @@ -196,6 +200,14 @@ </Collapsible> </section> {/if} + {#if categories.includes('harp')} + <section> + <Collapsible id="harp"> + <h2 slot="title">Harp</h2> + <Harp {data} /> + </Collapsible> + </section> + {/if} <section> <Collapsible id="leaderboards"> <h2 slot="title">Leaderboards</h2> |
