From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sun, 22 Mar 2020 13:22:43 +0000 (+0100)
Subject: Add some traces to understand what happens with connection indicator
X-Git-Url: https://git.auder.net/js/doc/app_dev.php/R.css?a=commitdiff_plain;h=ca6fae20191190bd6b8234b56963aa45652693e4;p=vchess.git

Add some traces to understand what happens with connection indicator
---

diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index f7e55494..f1521e67 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -456,6 +456,7 @@ export default {
           });
           break;
         case "connect":
+          console.log("connect " + data.from + " " + !!this.people[data.from]);
           if (!this.people[data.from]) {
             this.people[data.from] = { focus: true };
             this.newConnect[data.from] = true; //for self multi-connects tests
@@ -463,9 +464,11 @@ export default {
           }
           break;
         case "disconnect":
+          console.log("disconnect " + data.from);
           this.$delete(this.people, data.from);
           break;
         case "getfocus": {
+          console.log("get focus " + data.from + " " + !!this.people[data.from]);
           let player = this.people[data.from];
           if (!!player) {
             player.focus = true;
@@ -474,6 +477,7 @@ export default {
           break;
         }
         case "losefocus": {
+          console.log("lose focus " + data.from + " " + !!this.people[data.from]);
           let player = this.people[data.from];
           if (!!player) {
             player.focus = false;