diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-09-10 21:05:59 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-09-13 20:06:36 +0200 |
commit | 6407378d92eb8880e35e8ee33e1801136a1a44a7 (patch) | |
tree | 9bac140875ba3ba3a29c8fee864b0eca8d922399 /views/games_public.pug | |
parent | 2da7e775f26043e0d475faf89d1fce03c798b1e3 (diff) | |
download | server-6407378d92eb8880e35e8ee33e1801136a1a44a7.tar.gz |
Set player_count in database for faster and easier logic.
Track ready to start and unjoined games in "active" header.
Diffstat (limited to 'views/games_public.pug')
-rw-r--r-- | views/games_public.pug | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/views/games_public.pug b/views/games_public.pug index d49fc9e..9afc45c 100644 --- a/views/games_public.pug +++ b/views/games_public.pug @@ -1,8 +1,4 @@ //- vim:ts=4:sw=4: -- let open_games = games0.filter(game => game.status === 0 && !game.is_full) -- let ready_games = games0.filter(game => game.status === 0 && game.is_full) -- let replacement_games = games1.filter(game => game.status === 1 && !game.is_full) -- let active_games = games1.filter(game => game.status === 1 && game.is_full) doctype html html head @@ -13,7 +9,7 @@ html body include header article - h1 All Public Games + h1 Public Games h2 Open if open_games.length > 0 @@ -21,17 +17,21 @@ html else p No open games. - p - a(href="/create") Create a new game - if replacement_games.length > 0 - h2 Need replacement + h2 Open (missing players) +gamelist(replacement_games) + p + a(href="/create") Create a new game + if ready_games.length > 0 - h2 Ready + h2 Open (waiting to start) +gamelist(ready_games) if active_games.length > 0 - h2 Active + h2 Recently active +gamelist(active_games) + + if finished_games.length > 0 + h2 Recently finished + +gamelist(finished_games) |