| 1 | <template lang="pug"> |
| 2 | table |
| 3 | tr |
| 4 | th Variant |
| 5 | th From |
| 6 | th To |
| 7 | th Cadence |
| 8 | tr(v-for="c in challenges" @click="$emit('click-challenge',c)") |
| 9 | td {{ c.vname }} |
| 10 | td {{ c.from.name }} |
| 11 | td(v-if="!!c.to[0]") |
| 12 | span(v-for="pname in c.to") {{ pname }} |
| 13 | td(v-else) {{ c.to.length }} player{{ c.to.length >= 2 ? 's' : '' }} |
| 14 | td {{ c.timeControl }} |
| 15 | </template> |
| 16 | |
| 17 | <script> |
| 18 | export default { |
| 19 | name: "my-challenge-list", |
| 20 | props: ["challenges"], |
| 21 | }; |
| 22 | </script> |
| 23 | |
| 24 | <style lang="sass"> |
| 25 | // TODO: affichage bizarre sur petits écrans <=767px |
| 26 | </style> |