From f0dcb1109356bb6c04577b90d2105948e9df030a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 29 Jun 2021 12:26:27 +0200 Subject: Tweak join page blinker. Blink when ready to start for owner, when ready to play for others. --- public/join.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/public/join.js b/public/join.js index 5353f11..b0b93cf 100644 --- a/public/join.js +++ b/public/join.js @@ -1,5 +1,6 @@ "use strict"; +let start_status = game.status; let evtsrc = null; let timer = 0; @@ -122,12 +123,16 @@ function update() { window.start_button.disabled = !ready; window.start_button.classList = (game.status === 0) ? "" : "hide"; window.delete_button.classList = (game.status === 0 || game.is_solo) ? "" : "hide"; + if (game.status === 0 && ready) + start_blinker("READY TO START"); + else + stop_blinker(); + } else { + if (start_status === 0 && game.status === 1) + start_blinker("STARTED"); + else + stop_blinker(); } - - if (game.status === 0 && ready) - start_blinker("READY TO START"); - else - stop_blinker(); } window.onload = function () { -- cgit v1.2.3