X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=1107b58ce023c9207e1555f64e51c38eb0ce859a;hb=173f11dc3119c842a58daa9d1e0afc67eeb0e4e8;hp=0b7581bf1e22c87d49136e1cb42231ba05944db5;hpb=0b0dc040acd01ff1855b159c2933cb2eff73b26d;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index 0b7581bf..1107b58c 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,45 +1,92 @@
-table
- tr
- th Variant
- th From
- th To
- th Cadence
- tr(v-for="c in sortedChallenges" @click="$emit('click-challenge',c)")
- td {{ c.vname }}
- td {{ c.from.name }}
- td {{ c.to }}
- 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["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'!"] }}
-