aboutsummaryrefslogtreecommitdiff
path: root/web/pw-server/src/routes/editor.svelte
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-08-27 17:41:32 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-08-27 17:41:32 +0200
commit49a5735e07e7868195590a13c247698aaa1c5358 (patch)
tree30647b9b3cb25d8548e66757785f0b64cdf73490 /web/pw-server/src/routes/editor.svelte
parentc80ce332791c94b83a03c9f7c3cbb937f474cc5d (diff)
downloadplanetwars.dev-49a5735e07e7868195590a13c247698aaa1c5358.tar.xz
planetwars.dev-49a5735e07e7868195590a13c247698aaa1c5358.zip
show map info for matches
Diffstat (limited to 'web/pw-server/src/routes/editor.svelte')
-rw-r--r--web/pw-server/src/routes/editor.svelte24
1 files changed, 18 insertions, 6 deletions
diff --git a/web/pw-server/src/routes/editor.svelte b/web/pw-server/src/routes/editor.svelte
index b1644c8..ff8232c 100644
--- a/web/pw-server/src/routes/editor.svelte
+++ b/web/pw-server/src/routes/editor.svelte
@@ -12,6 +12,7 @@
import { debounce } from "$lib/utils";
import SubmitPane from "$lib/components/SubmitPane.svelte";
import OutputPane from "$lib/components/OutputPane.svelte";
+ import BotName from "./bots/[bot_name].svelte";
enum ViewMode {
Editor,
@@ -138,11 +139,12 @@
on:click={() => selectMatch(match.id)}
class:selected={match.id === selectedMatchId}
>
- <span class="match-timestamp">{formatMatchTimestamp(match.timestamp)}</span>
- <!-- hex is hardcoded for now, don't show map name -->
- <!-- <span class="match-mapname">hex</span> -->
- <!-- ugly temporary hardcode -->
- <span class="match-opponent">{match["players"][1]["bot_name"]}</span>
+ <div class="match-timestamp">{formatMatchTimestamp(match.timestamp)}</div>
+ <div class="match-card-body">
+ <!-- ugly temporary hardcode -->
+ <div class="match-opponent">{match["players"][1]["bot_name"]}</div>
+ <div class="match-map">{match["map"]?.name}</div>
+ </div>
</li>
{/each}
</ul>
@@ -221,14 +223,24 @@
.match-card {
padding: 10px 15px;
font-size: 11pt;
+ display: flex;
}
.match-timestamp {
color: #ccc;
}
+ .match-card-body {
+ margin: 0 8px;
+ }
+
.match-opponent {
- padding: 0 0.5em;
+ font-weight: 600;
+ color: #eee;
+ }
+
+ .match-map {
+ color: #ccc;
}
.sidebar-header {