Separate client and server codes. Keep everything in one git repo for simplicity
[vchess.git] / public / javascripts / components / gameList.js
diff --git a/public/javascripts/components/gameList.js b/public/javascripts/components/gameList.js
deleted file mode 100644 (file)
index 9b66982..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-Vue.component("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 != "*";
-               },
-       },
-       template: `
-               <table>
-                       <tr>
-                               <th v-if="showVariant">Variant</th>
-                               <th>Players names</th>
-                               <th>Cadence</th>
-                               <th v-if="showResult">Result</th>
-                       </tr>
-                       <tr v-for="g in games" @click="$emit('show-game',g)">
-                               <td v-if="showVariant">{{ g.vname }}</td>
-                               <td>
-                                       <span v-for="p in g.players">{{ p.name }}</span>
-                               </td>
-                               <td>{{ g.mainTime }} + {{ g.increment }}</td>
-                               <td v-if="showResult">{{ g.score }}</td>
-                       </tr>
-               </table>
-       `,
-});