X-Git-Url: https://git.auder.net/images/pieces/%22%20%20VariantRules.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=c2b27043e634103b39d107bd3465538fdb69ba35;hb=af4a532a1e1b25f85b240afc4edb244d9dd3ef5f;hp=ef3819b1ab19f79ab2cf053209a1335f262d0c0a;hpb=4a2093139089632727de4f510127ef186cab528e;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index ef3819b1..c2b27043 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -1064,8 +1064,15 @@ export default { // Also to MyGames page: this.notifyMyGames("newgame", gameInfo); }; - if (this.game.type == "live") + if (this.game.type == "live") { + // Increment game stats counter in DB + ajax( + "/gamestat", + "POST", + { data: { vid: gameInfo.vid } } + ); this.addAndGotoLiveGame(gameInfo, notifyNewGame); + } else { // corr game ajax( @@ -1602,7 +1609,7 @@ export default { // In corr games, callback to change page only after score is set: gameOver: function(score, scoreMsg, callback) { this.game.score = score; - if (!scoreMsg) scoreMsg = getScoreMessage(score); + if (!scoreMsg) scoreMsg = getScoreMessage(score, V.ReverseColors); this.game.scoreMsg = scoreMsg; document.getElementById("modalRules").checked = false; // Display result in a un-missable way: