summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/join.js15
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) {