Commit | Line | Data |
---|---|---|
85e5b5c1 BA |
1 | <template lang="pug"> |
2 | table | |
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 }} |
42c15a75 BA |
11 | td {{ g.players[0] }} |
12 | td {{ g.players[1] }} | |
13 | td {{ g.timeControl }} | |
85e5b5c1 BA |
14 | td(v-if="showResult") {{ g.score }} |
15 | </template> | |
16 | ||
17 | <script> | |
18 | export default { | |
19 | name: "my-game-list", | |
20 | props: ["games"], | |
21 | computed: { | |
85e5b5c1 BA |
22 | showResult: function() { |
23 | return this.games.length > 0 && this.games[0].score != "*"; | |
24 | }, | |
25 | }, | |
26 | }; | |
27 | </script> |