diff options
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": |