4 th(v-if="showVariant") Variant
8 th(v-if="showNbPlayers") Number of players
9 tr(v-for="c in challenges" @click="$emit('click-challenge',c)")
10 td(v-if="showVariant") {{ c.variant }}
13 span(v-for="p in c.to") {{ p.name }}
14 td {{ c.mainTime }} + {{ c.increment }}
15 td(v-if="showNbPlayers") {{ c.nbPlayers }}
20 name: "my-challenge-list",
21 props: ["challenges"],
23 showVariant: function() {
24 this.challenges.length > 0 && !!this.challenges[0].variant;
26 showNbPlayers: function() {
27 this.challenges.length > 0 && !!this.challenges[0].nbPlayers;
31 // TODO: challenge format from/to ou uid/players ............
35 // TODO: affichage bizarre sur petits écrans <=767px