From: Benjamin Auder Date: Sun, 5 Apr 2020 12:37:04 +0000 (+0200) Subject: Fix game download & upload for multi-moves variants X-Git-Url: https://git.auder.net/variants/Chakart/%7B%7B%20asset%28%27mixstore/current/git-favicon.png?a=commitdiff_plain;h=fef153df51fe60a5af4c5b2a05e0b1177187bf62;p=vchess.git Fix game download & upload for multi-moves variants --- diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 1e1a2149..7156670c 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -277,10 +277,10 @@ export default { pgn += '[Black "' + this.game.players[1].name + '"]\n'; pgn += '[Fen "' + this.game.fenStart + '"]\n'; pgn += '[Result "' + this.game.score + '"]\n'; - if (!!this.game.id) { - pgn += '[Cadence "' + this.game.cadence + '"]\n'; + if (!!this.game.id) pgn += '[Url "' + params.serverUrl + '/game/' + this.game.id + '"]\n'; - } + if (!!this.game.cadence) + pgn += '[Cadence "' + this.game.cadence + '"]\n'; pgn += '\n'; for (let i = 0; i < this.moves.length; i += 2) { if (i > 0) pgn += " "; diff --git a/client/src/components/MoveList.vue b/client/src/components/MoveList.vue index a9fa9834..6c999755 100644 --- a/client/src/components/MoveList.vue +++ b/client/src/components/MoveList.vue @@ -45,7 +45,7 @@ div span.score-msg {{ st.tr[message] }} .moves-list(v-if="!['none','highlight'].includes(show)") .tr(v-for="moveIdx in evenNumbers") - .td {{ firstNum + moveIdx / 2 + 1 }} + .td {{ firstNum + moveIdx / 2 }} .td(v-if="moveIdx < moves.length-1 || show == 'all'" :class="{'highlight-lm': cursor == moveIdx}" @click="() => gotoMove(moveIdx)" @@ -56,7 +56,7 @@ div :class="{'highlight-lm': highlightBlackmove(moveIdx+1)}" @click="() => gotoMove(moveIdx+1)" ) - | {{ notation(moves[moveIdx+1]) }} + | {{ notation(moves[moveIdx + 1]) }}