From 2f3b4a2f04488308a6ac9d1cf4db299874090e7b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 12 Feb 2025 00:43:17 +0100 Subject: Games that time out should result in "None" instead of resign. Clean up resignation handling. Prepare for collectively abandoning games as well. --- views/tm_pool.pug | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'views') diff --git a/views/tm_pool.pug b/views/tm_pool.pug index 1690535..e6c7715 100644 --- a/views/tm_pool.pug +++ b/views/tm_pool.pug @@ -49,9 +49,9 @@ html tr td Started td= human_date(pool.start_date) - tr - td Finished - if pool.finish_date + if pool.finish_date + tr + td Finished td= human_date(pool.finish_date) if seed.player_count === 2 @@ -84,7 +84,10 @@ html if ix > 0 |   if gs[1] === null - a.black(href="/join/" + gs[0]) − + if games.find(game => game.game_id === gs[0]).is_abandoned + a.black(href="/join/" + gs[0]) × + else + a.black(href="/join/" + gs[0]) − else a.black(href="/join/" + gs[0])= gs[1] td.r= row.points @@ -116,7 +119,10 @@ html each gs in result td.c if gs[1] === null - a.black(href="/join/" + gs[0]) − + if games.find(game => game.game_id === gs[0]).is_abandoned + a.black(href="/join/" + gs[0]) × + else + a.black(href="/join/" + gs[0]) − else a.black(href="/join/" + gs[0])= gs[1] td.r= row.points @@ -150,10 +156,16 @@ html if game.status > 1 td.w.r - each role, ix in roles - if ix > 0 - |  :  - | #{role_scores[role]} + if game.is_abandoned + | None + else + each role, ix in roles + if ix > 0 + |  :  + if role_scores[role] === null + | × + else + | #{role_scores[role]} else td.r if game.status > 0 -- cgit v1.2.3