From 9479b226f6cbfb53d66123a397f46cca0f682d45 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 9 Jul 2023 12:54:36 +0200 Subject: Use status constants. --- public/join.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'public/join.js') diff --git a/public/join.js b/public/join.js index 72da646..85445dc 100644 --- a/public/join.js +++ b/public/join.js @@ -155,6 +155,9 @@ function update() { if (player) { element.classList.remove("is_invite") switch (game.status) { + case 3: + element.innerHTML = player.name + break case 2: if (player.user_id === user_id) element.innerHTML = play_link(player) @@ -236,8 +239,8 @@ function update() { message.innerHTML = `Observe` } else if (game.status === 2) { message.innerHTML = `Review` - } else { - message.innerHTML = `Enter` + } else if (game.status === 3) { + message.innerHTML = "Archived" } if (game.owner_id === user_id) { -- cgit v1.2.3