summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-23 12:17:25 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-23 12:24:54 +0100
commit3f2c801b616f4c23c28c03d938bbadefefb49eb0 (patch)
treeb7e0eb5008c8faa93245c8c7f6037d77701a1962 /views
parent9f829056d1f3c45a0cea54dbd58d154274e2964b (diff)
downloadserver-3f2c801b616f4c23c28c03d938bbadefefb49eb0.tar.gz
Pause inactive users from tournament queue.HEADmaster
Remove very inactive users from tournament queue. Count tournaments as "open" while they still have players queued.
Diffstat (limited to 'views')
-rw-r--r--views/tm_seed.pug21
1 files changed, 9 insertions, 12 deletions
diff --git a/views/tm_seed.pug b/views/tm_seed.pug
index 81574ca..9902f4f 100644
--- a/views/tm_seed.pug
+++ b/views/tm_seed.pug
@@ -48,7 +48,7 @@ html
else
td #{seed.round_count} sequential
- if seed.is_open
+ if seed.is_open || queues.some(q => q.length > 0)
each queue,ix in queues
table.half
thead
@@ -66,21 +66,18 @@ html
td Nobody
if user
- if ix === 0
- if may_register
- if !queue.find(p => p.user_id === user.user_id)
- form(method="post" action="/api/tm/register/" + seed.seed_id)
- button(type="submit") Register
- button(disabled) Withdraw
- else
- div
- button(disabled) Register
- button(disabled) Withdraw
-
if queue.find(p => p.user_id === user.user_id)
form(method="post" action="/api/tm/withdraw/" + seed.seed_id + "/" + (ix+1))
button(disabled) Register
button(type="submit") Withdraw
+ else if ix === 0 && may_register
+ form(method="post" action="/api/tm/register/" + seed.seed_id)
+ button(type="submit") Register
+ button(disabled) Withdraw
+ else
+ div
+ button(disabled) Register
+ button(disabled) Withdraw
if user.user_id === 1
if queue.length >= seed.pool_size