X-Git-Url: https://git.auder.net/assets/current/gitweb.js?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=1107b58ce023c9207e1555f64e51c38eb0ce859a;hb=5f918a278904266a2a66a3c8e2a3655f37c2d2a7;hp=095c09666740fd1821fcbc5896f058aff08a9cf8;hpb=602d6befd30793111d3fda6e733f73e08d8b7a30;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index 095c0966..1107b58c 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,44 +1,92 @@
div
- table
+ table(v-if="challenges.length > 0")
thead
tr
th {{ st.tr["Variant"] }}
- th {{ st.tr["From"] }}
- th {{ st.tr["To"] }}
- th {{ st.tr["Time control"] }}
+ th {{ st.tr["With"] }}
+ th {{ st.tr["Cadence"] }}
+ th {{ st.tr["Random?"] }}
tbody
- tr(v-for="c in sortedChallenges" @click="$emit('click-challenge',c)")
- td(data-label="Variant") {{ c.vname }}
- td(data-label="From") {{ c.from.name }}
- td(data-label="To") {{ c.to }}
- td(data-label="Cadence") {{ c.timeControl }}
+ 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'!"] }}
+
+