X-Git-Url: https://git.auder.net/doc/screen_ranking.png?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=8c1f2dd56c4e0beafc33ee2dc3edda9910c4adba;hb=afbf3ca7151ef15a9e579b0f913683ab212396c4;hp=fd2a9015b6959e8e56058fdc11374b97564f86db;hpb=26f3a8879fb4b410ed8840c5a37397011c13bc1c;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index fd2a9015..8c1f2dd5 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,44 +1,91 @@
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 || "@nonymous" }}
- 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'!"] }}
+
+