Avoid direct references to (Dark) variant name in BaseGame, Analyse and Board
[vchess.git] / client / src / views / Analyse.vue
index 5d22306..d1c6d59 100644 (file)
@@ -3,9 +3,15 @@ main
   .row
     .col-sm-12
       .text-center
-        input#fen(v-model="curFen" @input="adjustFenSize()")
+        input#fen(
+          v-model="curFen"
+          @input="adjustFenSize()"
+        )
         button(@click="gotoFen()") {{ st.tr["Go"] }}
-  BaseGame(:game="game" :vr="vr")
+  BaseGame(
+    :game="game"
+    :vr="vr"
+  )
 </template>
 
 <script>
@@ -31,7 +37,6 @@ export default {
       },
       vr: null, //"variant rules" object initialized from FEN
       curFen: ""
-      //people: [], //players + observers //TODO later: interactive analyze...
     };
   },
   watch: {
@@ -44,13 +49,8 @@ export default {
   },
   created: function() {
     this.gameRef.vname = this.$route.params["vname"];
-    if (this.gameRef.vname == "Dark") {
-      alert(this.st.tr["Analyse in Dark mode makes no sense!"]);
-      history.back(); //or this.$router.go(-1)
-    } else {
-      this.gameRef.fen = this.$route.query["fen"].replace(/_/g, " ");
-      this.initialize();
-    }
+    this.gameRef.fen = this.$route.query["fen"].replace(/_/g, " ");
+    this.initialize();
   },
   methods: {
     initialize: async function() {