Fix turn indication in Dark mode
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 18 Feb 2020 18:04:17 +0000 (19:04 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 18 Feb 2020 18:04:17 +0000 (19:04 +0100)
client/src/components/BaseGame.vue

index 433a8ac..2015cc7 100644 (file)
@@ -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" ||