X-Git-Url: https://git.auder.net/images/pieces/bundles/framework/css/body.css?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=cf4565ad348e47e3cdfe6ee5418345320857fa8f;hb=3d9745ae10ba867e4c1ec6e848db29c5e293420b;hp=1aafa95bebe2afda68d176c1cdc004f59ded2750;hpb=5578a7bfe37908a6c020f1c394504062e0ad72b5;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index 1aafa95b..cf4565ad 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,26 +1,93 @@
-table
- tr
- th Variant
- th From
- th To
- th Cadence
- tr(v-for="c in challenges" @click="$emit('click-challenge',c)")
- td {{ c.variant.name }}
- td {{ c.from.name }}
- td(v-if="c.to[0].id > 0")
- span(v-for="p in c.to") {{ p.name }}
- td(v-else) {{ c.nbPlayers - 1 }} player{{ c.nbPlayers >= 3 ? 's' : '' }}
- td {{ c.timeControl }}
+div
+ table(v-if="challenges.length > 0")
+ thead
+ tr
+ th {{ st.tr["Variant"] }}
+ th {{ st.tr["With"] }}
+ th {{ st.tr["Cadence"] }}
+ th {{ st.tr["Options"] }}
+ tbody
+ tr(
+ v-for="c in sortedChallenges"
+ :class="{toyou:c.priority==1,fromyou:c.priority==2}"
+ @click="$emit('click-challenge',c)"
+ )
+ td {{ c.vname }}
+ td {{ withWho(c) }}
+ td {{ c.cadence }}
+ td(:class="getRandomnessClass(c)") {{ c.options.abridged || '' }}
+ p(v-else)
+ | {{ st.tr["No challenges found :( Click on 'New game'!"] }}
-