X-Git-Url: https://git.auder.net/images/pieces/%22%20%20V.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=1107b58ce023c9207e1555f64e51c38eb0ce859a;hb=917ed9b88816e95738ecc820ce455a8b3957b9e6;hp=bee328f16cd858113bfeabd47b7a8ebfb2cae525;hpb=c9695cb1ffd02c472dd24a2d336c9f3b98bd89da;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index bee328f1..1107b58c 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,24 +1,92 @@
-table
- tr
- th Variant
- th From
- th To
- th Cadence
- tr(v-for="c in challenges" @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'!"] }}
-