From 17d29c5397f5b2a39d76587722d20467a53014a8 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 18 May 2022 22:03:46 +0200 Subject: add basic leaderboard view --- web/pw-server/src/routes/index.svelte | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'web/pw-server/src/routes/index.svelte') diff --git a/web/pw-server/src/routes/index.svelte b/web/pw-server/src/routes/index.svelte index 32efe69..243f4da 100644 --- a/web/pw-server/src/routes/index.svelte +++ b/web/pw-server/src/routes/index.svelte @@ -13,11 +13,13 @@ import SubmitPane from "$lib/components/SubmitPane.svelte"; import OutputPane from "$lib/components/OutputPane.svelte"; import RulesView from "$lib/components/RulesView.svelte"; + import Leaderboard from "$lib/components/Leaderboard.svelte"; enum ViewMode { Editor, MatchVisualizer, Rules, + Leaderboard, } let matches = []; @@ -111,10 +113,10 @@ return log; } - function selectEditor() { + function setViewMode(viewMode_: ViewMode) { selectedMatchId = undefined; selectedMatchLog = undefined; - viewMode = ViewMode.Editor; + viewMode = viewMode_; } function selectRules() { @@ -140,17 +142,24 @@ +