A few fixes, drop planned problems support (replaced by forum + mode analyze)
[vchess.git] / client / src / components / GameList.vue
index c7f661c..2b7f657 100644 (file)
@@ -1,15 +1,16 @@
 <template lang="pug">
 table
   tr
-    th(v-if="showVariant") Variant
-    th Players names
-    th Cadence
+    th Variant
+    th White
+    th Black
+    th Time control
     th(v-if="showResult") Result
   tr(v-for="g in games" @click="$emit('show-game',g)")
-    td(v-if="showVariant") {{ g.vname }}
-    td
-      span(v-for="p in g.players") {{ p.name }}
-    td {{ g.mainTime }} + {{ g.increment }}
+    td {{ g.vname }}
+    td {{ g.players[0].name || "@nonymous" }}
+    td {{ g.players[1].name || "@nonymous" }}
+    td {{ g.timeControl }}
     td(v-if="showResult") {{ g.score }}
 </template>
 
@@ -18,11 +19,8 @@ export default {
   name: "my-game-list",
        props: ["games"],
        computed: {
-               showVariant: function() {
-                       return this.games.length > 0 && !!this.games[0].vname;
-               },
                showResult: function() {
-                       return this.games.length > 0 && this.games[0].score != "*";
+                       return this.games.some(g => g.score != "*");
                },
        },
 };