diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-02-12 00:43:17 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-02-12 12:04:43 +0100 |
commit | 2b0ffdbba7f00ed9e34a1b27ceaae11b202dd0ed (patch) | |
tree | a65e85f82efbe39ca116674a4258284bcf77c23e /views | |
parent | a764abe6565544bea8591b26839ad931f3f42e4d (diff) | |
download | server-2b0ffdbba7f00ed9e34a1b27ceaae11b202dd0ed.tar.gz |
Games that time out should result in "None" instead of resign.
Clean up resignation handling.
Prepare for collectively abandoning games as well.
Diffstat (limited to 'views')
-rw-r--r-- | views/tm_pool.pug | 30 |
1 files changed, 21 insertions, 9 deletions
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 |