mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 21:07:27 +08:00
[+] Switching games in leaderboard
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import type { GenericRanking } from "../libs/generalTypes";
|
||||
import StatusOverlays from "../components/StatusOverlays.svelte";
|
||||
import type { GameName } from "../libs/scoring";
|
||||
import { GAME_TITLE } from "../libs/i18n";
|
||||
|
||||
export let game: GameName = 'mai2';
|
||||
|
||||
@@ -20,7 +21,14 @@
|
||||
</script>
|
||||
|
||||
<main class="content leaderboard">
|
||||
<h2 class="outer-title">Global Leaderboard</h2>
|
||||
<div class="outer-title-options">
|
||||
<h2>Global Leaderboard</h2>
|
||||
<nav>
|
||||
{#each Object.entries(GAME_TITLE) as [k, v]}
|
||||
<a href="/ranking/{k}" class:active={k === game}>{v}</a>
|
||||
{/each}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
{#if d}
|
||||
<div class="leaderboard-container">
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
GenericGameSummary,
|
||||
MusicMeta,
|
||||
TrendEntry,
|
||||
AquaNetUser,
|
||||
CardSummary
|
||||
AquaNetUser
|
||||
} from "../libs/generalTypes";
|
||||
import { DATA_HOST } from "../libs/config";
|
||||
import 'cal-heatmap/cal-heatmap.css';
|
||||
@@ -17,7 +16,7 @@
|
||||
import { type GameName, getMult } from "../libs/scoring";
|
||||
import StatusOverlays from "../components/StatusOverlays.svelte";
|
||||
import Icon from "@iconify/svelte";
|
||||
import {t} from "../libs/i18n";
|
||||
import { GAME_TITLE, t } from "../libs/i18n";
|
||||
|
||||
const TREND_DAYS = 60
|
||||
|
||||
@@ -30,8 +29,6 @@
|
||||
let me: AquaNetUser
|
||||
title(`User ${username}`)
|
||||
|
||||
const GAME_TITLE: { [key in GameName]: string } =
|
||||
{chu3: t("UserHome.Game.Chu3"), mai2: t("UserHome.Game.Mai2"), ongeki: t("UserHome.Game.Ongeki")}
|
||||
const titleText = GAME_TITLE[game]
|
||||
|
||||
interface MusicAndPlay extends MusicMeta, GenericGamePlaylog {}
|
||||
|
||||
Reference in New Issue
Block a user