diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-29 12:26:27 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-06-29 12:35:02 +0200 |
commit | f0dcb1109356bb6c04577b90d2105948e9df030a (patch) | |
tree | 46cf2c3a17caf76f00e51f539cf67d9898a6036e /public | |
parent | 0685fe9df4b3f3d62686dc1f2841cb17f4da45ab (diff) | |
download | server-f0dcb1109356bb6c04577b90d2105948e9df030a.tar.gz |
Tweak join page blinker.
Blink when ready to start for owner, when ready to play for others.
Diffstat (limited to 'public')
-rw-r--r-- | public/join.js | 15 |
1 files 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 () { |