From 6e75cac7cca1dc46f83e9eb7a7624cfdbe09ab3b Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Fri, 5 Aug 2022 19:21:32 +0200 Subject: extract MatchList component --- .../src/lib/components/matches/MatchList.svelte | 94 ++++++++++++++++++ web/pw-server/src/routes/matches/index.svelte | 106 +-------------------- 2 files changed, 97 insertions(+), 103 deletions(-) create mode 100644 web/pw-server/src/lib/components/matches/MatchList.svelte (limited to 'web/pw-server') diff --git a/web/pw-server/src/lib/components/matches/MatchList.svelte b/web/pw-server/src/lib/components/matches/MatchList.svelte new file mode 100644 index 0000000..aea59c2 --- /dev/null +++ b/web/pw-server/src/lib/components/matches/MatchList.svelte @@ -0,0 +1,94 @@ + + + + + + + + + {#each matches as match} + goto(match_url(match))}> + + + {#if match["winner"] == null} + + + {:else if match["winner"] == 0} + + + {:else if match["winner"] == 1} + + + {/if} + + + {/each} +
timestampplayer 1 + + player 2
+ {dayjs(match["timestamp"]).format("YYYY-MM-DD HH:mm")} + + {match["players"][0]["bot_name"]} + TIE TIE WIN LOSS LOSS WIN + {match["players"][1]["bot_name"]} +
+ + diff --git a/web/pw-server/src/routes/matches/index.svelte b/web/pw-server/src/routes/matches/index.svelte index 667e551..c89013e 100644 --- a/web/pw-server/src/routes/matches/index.svelte +++ b/web/pw-server/src/routes/matches/index.svelte @@ -22,62 +22,13 @@
- - - - - - - - - {#each matches as match} - goto(match_url(match))}> - - - {#if match["winner"] == null} - - - {:else if match["winner"] == 0} - - - {:else if match["winner"] == 1} - - - {/if} - - - {/each} -
timestampplayer 1player 2
- {dayjs(match["timestamp"]).format("YYYY-MM-DD HH:mm")} - - {match["players"][0]["bot_name"]} - - TIE - - TIE - - WIN - - LOSS - - LOSS - - WIN - - {match["players"][1]["bot_name"]} -
+
\ No newline at end of file + -- cgit v1.2.3