diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-10-05 15:05:30 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-10-05 15:18:36 +0200 |
commit | 6c5df51ed4d6cd0adbab53df277102738fccc70d (patch) | |
tree | 2421f4736f6aeb5211127e06e2e1f707b3267a94 /public | |
parent | f39d772de8d75232dd2d2637124ab60e6a408fac (diff) | |
download | server-6c5df51ed4d6cd0adbab53df277102738fccc70d.tar.gz |
Add game "setups" for automated match making and tournaments.
Diffstat (limited to 'public')
-rw-r--r-- | public/join.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/public/join.js b/public/join.js index a22e0fa..2774241 100644 --- a/public/join.js +++ b/public/join.js @@ -156,6 +156,21 @@ function update() { document.getElementById(role_id + "_name").textContent = role 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)) + if (player.user_id === user_id && (game.status === 1 || game.status === 2)) + element.innerHTML = play_link(player) + else + element.innerHTML = user_link(player) + } else { + element.innerHTML = `<i>Empty</i>` + } + continue + } + if (player) { element.classList.remove("is_invite") switch (game.status) { |