From: Benjamin Auder Date: Fri, 6 Mar 2020 17:06:10 +0000 (+0100) Subject: Improve 'connected' display in case of multi-accounts on same browser X-Git-Url: https://git.auder.net/variants/img/doc/html/up.jpg?a=commitdiff_plain;h=3fff2bd5cd782a5c5f64a015f9bba2f16ff5b946;p=vchess.git Improve 'connected' display in case of multi-accounts on same browser --- diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 5c4630b0..214f8196 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -232,8 +232,12 @@ export default { isConnected: function(index) { const player = this.game.players[index]; // Is it me ? - if (this.st.user.sid == player.sid || this.st.user.id == player.uid) + if ( + (this.st.user.sid == player.sid || this.st.user.id == player.uid) && + (!this.st.user.name || this.st.user.name == player.name) + ) { return true; + } // Try to find a match in people: return ( (