Add some TODOs for simultaneous games support
[vchess.git] / client / src / views / Game.vue
index cd781a5..d702b0e 100644 (file)
@@ -179,6 +179,9 @@ main
 </template>
 
 <script>
+// TODO: this will be a component instead ?
+// If simultaneous games, no "rematch" button
+
 import BaseGame from "@/components/BaseGame.vue";
 import UserBio from "@/components/UserBio.vue";
 import Chat from "@/components/Chat.vue";
@@ -522,7 +525,11 @@ export default {
     },
     getGameType: function(game) {
       if (!!game.id.toString().match(/^i/)) return "import";
-      return game.cadence.indexOf("d") >= 0 ? "corr" : "live";
+      return (
+        game.cadence.indexOf("d") >= 0
+          ? "corr"
+          : (game.cadence.indexOf("/") >= 0 ? "simul" : "live")
+      );
     },
     // Notify something after a new move (to opponent and me on MyGames page)
     notifyMyGames: function(thing, data) {