From b48f0adccb11619680a47cac5fa9c68f638bd489 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 17 May 2020 13:15:41 -0400 Subject: [WebCards] Update from my local repos --- webcards/scripts/client.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webcards/scripts/client.js') 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": -- cgit v1.2.3