diff options
author | Kyle Gunger <corechg@gmail.com> | 2020-05-17 13:15:41 -0400 |
---|---|---|
committer | Kyle Gunger <corechg@gmail.com> | 2020-05-17 13:15:41 -0400 |
commit | b48f0adccb11619680a47cac5fa9c68f638bd489 (patch) | |
tree | 9e75612c21ae9944b354afa13e2e94834e020e9c /webcards/scripts/client.js | |
parent | c9e2eee382df60bc7a058b56c804258848477d67 (diff) |
[WebCards] Update from my local repos
Diffstat (limited to 'webcards/scripts/client.js')
-rw-r--r-- | webcards/scripts/client.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webcards/scripts/client.js b/webcards/scripts/client.js index ea62e26..0bf2e75 100644 --- a/webcards/scripts/client.js +++ b/webcards/scripts/client.js @@ -26,13 +26,14 @@ Client.prototype = { if(m.type == "error" || m.type == "closed") { var t = m.type; t = t[0].toUpperCase() + t.slice(1) - this.lob.setState(t, "#D00", this.soc.server); + this.lob.setState(t, "closed", this.soc.server); this.tab.handleClose(); return; } switch(this.state) { case "handshake": + this.lob.setState("Connected", "ok", this.soc.server); this.handshake(m); break; case "lobby": @@ -49,7 +50,7 @@ Client.prototype = { case "verr": this.soc.close(); alert(`Error connecting to server: version of client (${this.version}) not accepted.`); - console.error("Error connecting to server: version of client (${this.version}) not accepted."); + console.error(`Error connecting to server: version of client (${this.version}) not accepted.`); console.error(m.data); return; case "lobby": |