X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=6d5a92abec55604c669f25b0fa0c8e078e17c56e;hb=51336cd2180ca1a56eba7f773abe715d0eb5cddb;hp=ae90255d2cd7931d8d99187f86065040c97df7dc;hpb=26d8a01a40dc198b633ae86f698b1ae82415e5e1;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index ae90255d..6d5a92ab 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -89,7 +89,7 @@ main aria-label="Chat" ) img(src="/images/icons/chat.svg") - #actions(v-if="game.score=='*'") + #actions(v-show="game.score=='*'") button.tooltip( @click="clickDraw()" :class="{['draw-' + drawOffer]: true}" @@ -97,19 +97,19 @@ main ) img(src="/images/icons/draw.svg") button.tooltip( - v-if="!!game.mycolor" + v-show="!!game.mycolor" @click="abortGame()" :aria-label="st.tr['Abort']" ) img(src="/images/icons/abort.svg") button.tooltip( - v-if="!!game.mycolor" + v-show="!!game.mycolor" @click="resign()" :aria-label="st.tr['Resign']" ) img(src="/images/icons/resign.svg") button.tooltip( - v-else + v-show="game.score!='*'" @click="clickRematch()" :class="{['rematch-' + rematchOffer]: true}" :aria-label="st.tr['Rematch']" @@ -815,8 +815,7 @@ export default { GameStorage.update(this.gameRef, { drawOffer: "" }); } } - this.$refs["basegame"].play( - movePlus.move, "received", null, true); + this.$refs["basegame"].play(movePlus.move, "received"); this.game.clocks[moveColIdx] = movePlus.clock; this.processMove( movePlus.move, @@ -883,6 +882,8 @@ export default { this.$router.push("/game/" + gameInfo.id); } else { this.rematchId = gameInfo.id; + document.getElementById("modalRules").checked = false; + document.getElementById("modalScore").checked = false; document.getElementById("modalRematch").checked = true; } break; @@ -945,7 +946,7 @@ export default { this.game.clocks[oppIdx] = data.clock; if (data.movesCount > L) { // Just got last move from him - this.$refs["basegame"].play(data.lastMove, "received", null, true); + this.$refs["basegame"].play(data.lastMove, "received"); this.processMove(data.lastMove); } else { if (!!this.clockUpdate) clearInterval(this.clockUpdate); @@ -1566,6 +1567,7 @@ export default { this.game.score = score; if (!scoreMsg) scoreMsg = getScoreMessage(score); this.game.scoreMsg = scoreMsg; + document.getElementById("modalRules").checked = false; // Display result in a un-missable way: document.getElementById("modalScore").checked = true; this.$set(this.game, "scoreMsg", scoreMsg); @@ -1610,7 +1612,7 @@ export default {