diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-23 12:17:25 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-23 12:24:54 +0100 |
commit | 3f2c801b616f4c23c28c03d938bbadefefb49eb0 (patch) | |
tree | b7e0eb5008c8faa93245c8c7f6037d77701a1962 /views/tm_seed.pug | |
parent | 9f829056d1f3c45a0cea54dbd58d154274e2964b (diff) | |
download | server-3f2c801b616f4c23c28c03d938bbadefefb49eb0.tar.gz |
Remove very inactive users from tournament queue.
Count tournaments as "open" while they still have players queued.
Diffstat (limited to 'views/tm_seed.pug')
-rw-r--r-- | views/tm_seed.pug | 21 |
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 |