From 3f2c801b616f4c23c28c03d938bbadefefb49eb0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 23 Nov 2024 12:17:25 +0100 Subject: Pause inactive users from tournament queue. Remove very inactive users from tournament queue. Count tournaments as "open" while they still have players queued. --- views/tm_seed.pug | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'views') 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 -- cgit v1.2.3