From: Benjamin Auder Date: Tue, 18 Feb 2020 18:04:17 +0000 (+0100) Subject: Fix turn indication in Dark mode X-Git-Url: https://git.auder.net/variants/img/pieces/scripts/doc/html/index.html?a=commitdiff_plain;h=58ae6be576fb06302d70eb19815dcb71b765a8b8;p=vchess.git Fix turn indication in Dark mode --- diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 433a8ac6..2015cc7e 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -40,8 +40,7 @@ div#baseGame( :incheck="incheck" @play-move="play" ) - #turnIndicator(v-if="game.vname=='Dark' && game.score=='*'") - | {{ st.tr[vr.turn + " to move"] }} + #turnIndicator(v-if="game.vname=='Dark' && game.score=='*'") {{ turn }} #controls button(@click="gotoBegin()") << button(@click="undo()") < @@ -125,6 +124,9 @@ export default { showMoves: function() { return this.game.vname != "Dark" || this.game.score != "*"; }, + turn: function() { + return this.st.tr[(this.vr.turn == 'w' ? "White" : "Black") + " to move"]; + }, analyze: function() { return ( this.game.mode == "analyze" ||