X-Git-Url: https://git.auder.net/%3C?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=8c1f2dd56c4e0beafc33ee2dc3edda9910c4adba;hb=bbf668379ae5980d5068dd76cf907c87ce7ed648;hp=a52e0cae57ee7fdb4fe39580759790a09b5be2d9;hpb=85e5b5c1e6192a134fa69182e8c077605fdb969f;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index a52e0cae..8c1f2dd5 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,36 +1,91 @@
-table
- tr
- th(v-if="showVariant") Variant
- th From
- th To
- th Cadence
- th(v-if="showNbPlayers") Number of players
- tr(v-for="c in challenges" @click="$emit('click-challenge',c)")
- td(v-if="showVariant") {{ c.variant }}
- td {{ c.from.name }}
- td
- span(v-for="p in c.to") {{ p.name }}
- td {{ c.mainTime }} + {{ c.increment }}
- td(v-if="showNbPlayers") {{ c.nbPlayers }}
+div
+ table(v-if="challenges.length > 0")
+ thead
+ tr
+ th {{ st.tr["Variant"] }}
+ th {{ st.tr["With"] }}
+ th {{ st.tr["Cadence"] }}
+ th {{ st.tr["Random?"] }}
+ 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)")
+ p(v-else)
+ | {{ st.tr["No challenges found :( Click on 'New game'!"] }}
-