projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TODO: GameStorage.update + clocks started...
[vchess.git]
/
client
/
src
/
components
/
GameList.vue
diff --git
a/client/src/components/GameList.vue
b/client/src/components/GameList.vue
index
c7f661c
..
bb97a74
100644
(file)
--- a/
client/src/components/GameList.vue
+++ b/
client/src/components/GameList.vue
@@
-1,16
+1,18
@@
<template lang="pug">
table
tr
<template lang="pug">
table
tr
- th
(v-if="showVariant")
Variant
+ th Variant
th Players names
th Cadence
th(v-if="showResult") Result
th Players names
th Cadence
th(v-if="showResult") Result
+ th(v-else) Moves count
tr(v-for="g in games" @click="$emit('show-game',g)")
tr(v-for="g in games" @click="$emit('show-game',g)")
- td
(v-if="showVariant")
{{ g.vname }}
+ td {{ g.vname }}
td
span(v-for="p in g.players") {{ p.name }}
td {{ g.mainTime }} + {{ g.increment }}
td(v-if="showResult") {{ g.score }}
td
span(v-for="p in g.players") {{ p.name }}
td {{ g.mainTime }} + {{ g.increment }}
td(v-if="showResult") {{ g.score }}
+ td(v-else) {{ g.movesCount }}
</template>
<script>
</template>
<script>
@@
-18,9
+20,6
@@
export default {
name: "my-game-list",
props: ["games"],
computed: {
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 != "*";
},
showResult: function() {
return this.games.length > 0 && this.games[0].score != "*";
},