summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-22 00:23:49 +0100
committerTor Andersson <tor@ccxvii.net>2023-12-23 02:10:40 +0100
commitb88d328bf3a452bdfbf5e0dd1d5860bbbeae7f10 (patch)
treee93c0d375a333588aadb2cd5eb407f703feb3e9e
parent5bafe0865f518e4926fc41fec21064e894367fdb (diff)
downloadserver-b88d328bf3a452bdfbf5e0dd1d5860bbbeae7f10.tar.gz
Simpler join page for not logged in players looking at a match.
-rw-r--r--public/join.js11
1 files changed, 11 insertions, 0 deletions
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 = `<i>Empty</i>`
+ }
+ continue
+ }
+
if (player) {
element.classList.remove("is_invite")
switch (game.status) {