A few fixes, drop planned problems support (replaced by forum + mode analyze)
[vchess.git] / client / src / components / GameList.vue
CommitLineData
85e5b5c1
BA
1<template lang="pug">
2table
3 tr
9d58ef95 4 th Variant
42c15a75
BA
5 th White
6 th Black
7 th Time control
85e5b5c1
BA
8 th(v-if="showResult") Result
9 tr(v-for="g in games" @click="$emit('show-game',g)")
9d58ef95 10 td {{ g.vname }}
afd3240d
BA
11 td {{ g.players[0].name || "@nonymous" }}
12 td {{ g.players[1].name || "@nonymous" }}
42c15a75 13 td {{ g.timeControl }}
85e5b5c1
BA
14 td(v-if="showResult") {{ g.score }}
15</template>
16
17<script>
18export default {
19 name: "my-game-list",
20 props: ["games"],
21 computed: {
85e5b5c1 22 showResult: function() {
afd3240d 23 return this.games.some(g => g.score != "*");
85e5b5c1
BA
24 },
25 },
26};
27</script>