summaryrefslogtreecommitdiff
path: root/views/info.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-10 21:05:59 +0200
committerTor Andersson <tor@ccxvii.net>2023-09-13 20:06:36 +0200
commit6407378d92eb8880e35e8ee33e1801136a1a44a7 (patch)
tree9bac140875ba3ba3a29c8fee864b0eca8d922399 /views/info.pug
parent2da7e775f26043e0d475faf89d1fce03c798b1e3 (diff)
downloadserver-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/info.pug')
-rw-r--r--views/info.pug15
1 files changed, 4 insertions, 11 deletions
diff --git a/views/info.pug b/views/info.pug
index 60eac7b..51fc81d 100644
--- a/views/info.pug
+++ b/views/info.pug
@@ -1,9 +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)
-- let finished_games = games2
doctype html
html
head
@@ -24,25 +19,23 @@ html
p Read more about the game on #[a(href="https://boardgamegeek.com/boardgame/"+title.bgg) boardgamegeek.com].
- h2 Open
if open_games.length > 0
+ h2 Open
+gamelist(open_games, true)
- else
- p No open games.
if replacement_games.length > 0
- h2 Need replacement
+ h2 Open (missing players)
+gamelist(replacement_games, true)
p
a(href="/create/"+title.title_id) Create a new game
if ready_games.length > 0
- h2 Ready
+ h2 Open (waiting to start)
+gamelist(ready_games, true)
if active_games.length > 0
- h2 Active
+ h2 Recently active
+gamelist(active_games, true)
if finished_games.length > 0