Fix Eightpieces, add some simple variants, add a basic variants classification instea...
[vchess.git] / client / src / components / MoveList.vue
index 96d6704..e36c058 100644 (file)
@@ -53,14 +53,12 @@ div
       .td(
         :class="{'highlight-lm': cursor == moveIdx}"
         @click="() => gotoMove(moveIdx)"
-      )
-        | {{ notation(moveIdx) }}
+        v-html="notation(moveIdx)")
       .td(
         v-if="moveIdx < moves.length-1"
         :class="{'highlight-lm': cursor == moveIdx+1}"
         @click="() => gotoMove(moveIdx+1)"
-      )
-        | {{ notation(moveIdx + 1) }}
+        v-html="notation(moveIdx + 1)")
 </template>
 
 <script>
@@ -81,7 +79,7 @@ export default {
     document.getElementById("adjuster")
       .addEventListener("click", processModalClick);
     // Take full width on small screens:
-    let boardSize = parseInt(localStorage.getItem("boardSize"));
+    let boardSize = parseInt(localStorage.getItem("boardSize"), 10);
     if (!boardSize) {
       boardSize =
         window.innerWidth >= 768
@@ -125,7 +123,10 @@ export default {
     },
     btnRulesClass: function() {
       // "rr" for "rules read"
-      return { highlightRules: !localStorage.getItem("rr_" + this.vname) };
+      return {
+        highlightRules:
+          !!this.vname && !localStorage.getItem("rr_" + this.vname)
+      };
     }
   },
   methods: {