Debug newmove + messages
[vchess.git] / client / src / components / BaseGame.vue
index e0bd937..83311cc 100644 (file)
@@ -16,7 +16,7 @@
       button(@click="flip") Flip
       button(@click="gotoBegin") GotoBegin
       button(@click="gotoEnd") GotoEnd
-    #messageDiv.section-content {{ curMoveMessage() }}
+    #messageDiv.section-content(v-if="game.type=='corr'") {{ curMoveMessage() }}
     #fenDiv.section-content(v-if="showFen && !!vr")
       p#fenString.text-center {{ vr.getFen() }}
     #pgnDiv.section-content
@@ -105,6 +105,9 @@ export default {
         return "";
       return this.game.moves[this.cursor].message || "";
     },
+    setCurrentMessage: function(message) {
+      this.game.moves[this.game.moves.length-1].message = message;
+    },
     download: function() {
       const content = this.getPgn();
       // Prepare and trigger download link