X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=fa7ab3b29f67d7e9ef498e9c5cf5545b7ba52612;hb=bf588c57bdac8525f57c2017b6e70e9390e06700;hp=6722f3341d8b0c1102fcc9adaed3d3f38216bfc2;hpb=d060d8cb355367f3cd9533c9ad37552802090502;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 6722f334..fa7ab3b2 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -522,7 +522,11 @@ export default { }, getGameType: function(game) { if (!!game.id.toString().match(/^i/)) return "import"; - return game.cadence.indexOf("d") >= 0 ? "corr" : "live"; + return ( + game.cadence.indexOf("d") >= 0 + ? "corr" + : (game.cadence.indexOf("/") >= 0 ? "simul" : "live") + ); }, // Notify something after a new move (to opponent and me on MyGames page) notifyMyGames: function(thing, data) { @@ -1285,7 +1289,10 @@ console.log(data.data); // - from server (one correspondance game I play[ed] or not) // - from remote peer (one live game I don't play, finished or not) fetchGame: function(callback) { - if (Number.isInteger(this.gameRef) || !isNaN(parseInt(this.gameRef))) { + if ( + Number.isInteger(this.gameRef) || + !isNaN(parseInt(this.gameRef, 10)) + ) { // corr games identifiers are integers ajax( "/games",