2024-02-29 13:55:46 +08:00
|
|
|
<script lang="ts">
|
2024-02-29 23:42:22 +08:00
|
|
|
import { title } from "../libs/ui";
|
|
|
|
import { GAME } from "../libs/sdk";
|
|
|
|
import type { GenericRanking } from "../libs/generalTypes";
|
2024-02-29 13:55:46 +08:00
|
|
|
|
2024-02-29 23:42:22 +08:00
|
|
|
title(`Ranking`)
|
|
|
|
|
|
|
|
let d: { users: GenericRanking[] }
|
2024-02-29 13:55:46 +08:00
|
|
|
|
|
|
|
Promise.all([
|
|
|
|
GAME.ranking('mai2')
|
2024-02-29 23:42:22 +08:00
|
|
|
]).then(([ users ]) => {
|
|
|
|
d = { users }
|
2024-02-29 13:55:46 +08:00
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<main class="content">
|
2024-02-29 23:42:22 +08:00
|
|
|
<h2>Global Leaderboard</h2>
|
2024-02-29 13:55:46 +08:00
|
|
|
|
2024-02-29 23:42:22 +08:00
|
|
|
{#if d}
|
|
|
|
{#each d.users as user}
|
|
|
|
<div class="lb-placement">
|
2024-02-29 14:05:07 +08:00
|
|
|
<p class="placement-rank">{user.rank}</p>
|
|
|
|
<h4 class="placement-name">{user.name}</h4>
|
2024-02-29 23:42:22 +08:00
|
|
|
<h4 class="placement-accuracy">{(+user.accuracy).toFixed(2)}%</h4>
|
2024-02-29 14:05:07 +08:00
|
|
|
<h4 class="placement-rating">{user.rating}</h4>
|
|
|
|
<h4 class="placement-full-combo">{user.fullCombo}</h4>
|
|
|
|
<h4 class="placement-all-perfect">{user.allPerfect}</h4>
|
2024-02-29 23:42:22 +08:00
|
|
|
</div>
|
2024-02-29 13:55:46 +08:00
|
|
|
{/each}
|
2024-02-29 23:42:22 +08:00
|
|
|
{:else}
|
2024-02-29 13:55:46 +08:00
|
|
|
<p>Please Wait...</p>
|
2024-02-29 23:42:22 +08:00
|
|
|
{/if}
|
2024-02-29 13:55:46 +08:00
|
|
|
</main>
|