From b88d328bf3a452bdfbf5e0dd1d5860bbbeae7f10 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 22 Dec 2023 00:23:49 +0100 Subject: Simpler join page for not logged in players looking at a match. --- public/join.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/join.js b/public/join.js index 185aa6c..6ae4deb 100644 --- a/public/join.js +++ b/public/join.js @@ -190,6 +190,17 @@ function update_no_login() { let player = players.find(p => p.role === role) let element = document.getElementById(role_id) + if (game.is_match) { + if (player) { + if (game.status === 1) + element.classList.toggle("is_active", is_active(player, role)) + element.innerHTML = user_link(player) + } else { + element.innerHTML = `Empty` + } + continue + } + if (player) { element.classList.remove("is_invite") switch (game.status) { -- cgit v1.2.3