summaryrefslogtreecommitdiff
path: root/views/tm_pool.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-02-12 00:43:17 +0100
committerTor Andersson <tor@ccxvii.net>2025-02-12 12:04:43 +0100
commit2b0ffdbba7f00ed9e34a1b27ceaae11b202dd0ed (patch)
treea65e85f82efbe39ca116674a4258284bcf77c23e /views/tm_pool.pug
parenta764abe6565544bea8591b26839ad931f3f42e4d (diff)
downloadserver-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/tm_pool.pug')
-rw-r--r--views/tm_pool.pug30
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
| &nbsp;
if gs[1] === null
- a.black(href="/join/" + gs[0]) &minus;
+ if games.find(game => game.game_id === gs[0]).is_abandoned
+ a.black(href="/join/" + gs[0]) &#xd7;
+ else
+ a.black(href="/join/" + gs[0]) &minus;
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]) &minus;
+ if games.find(game => game.game_id === gs[0]).is_abandoned
+ a.black(href="/join/" + gs[0]) &#xd7;
+ else
+ a.black(href="/join/" + gs[0]) &minus;
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
- | &nbsp;:&nbsp;
- | #{role_scores[role]}
+ if game.is_abandoned
+ | None
+ else
+ each role, ix in roles
+ if ix > 0
+ | &nbsp;:&nbsp;
+ if role_scores[role] === null
+ | &#xd7;
+ else
+ | #{role_scores[role]}
else
td.r
if game.status > 0