X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FHall.vue;h=4a481df791fb917d653ce40da9f2f15e1bccbd77;hb=1f6bf26c9ba540bfb46483c0935694c70e8016cf;hp=01f588f23dacc8acbe6abe9318df2a431b810640;hpb=6c7cbfedc6ecf2b49f6b1e27a174039e92a36365;p=vchess.git diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index 01f588f2..4a481df7 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -572,14 +572,12 @@ export default { } }); const gid = gids[Math.floor(Math.random() * gids.length)]; - const game = this.games.find(g => g.id == gid); - if (!!game) this.showGame(game); - else this.$router.push("/game/" + gid); //game vs. me + window.open("/#/game/" + gid, "_blank"); }, showGame: function(g) { // NOTE: we are an observer, since only games I don't play are shown here // ==> Moves sent by connected remote player(s) if live game - this.$router.push("/game/" + g.id); + window.open("/#/game/" + g.id, "_blank"); }, toggleSocialColor: function(action) { if (!action && document.getElementById("modalPeople").checked) @@ -1305,7 +1303,7 @@ export default { this.$router.push("/game/" + gameInfo.id); }); }, - this.focus ? 500 + 1000 * Math.random() : 0 + this.focus ? 0 : 500 + 1000 * Math.random() ); } } @@ -1314,7 +1312,7 @@ export default {