X-Git-Url: https://git.auder.net/pieces/Checkered/cp.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FChallengeList.vue;h=7572ede11e5659d4bb90abea53ebd766b509a24b;hb=7ba4a5bc5b64e19a1e7f26aa232d5c50770d07ad;hp=8951226b53e036d8289fdd425e55bf8a453ae394;hpb=03608482744c433ad284f4b61e85b2e8cff4f5f3;p=vchess.git
diff --git a/client/src/components/ChallengeList.vue b/client/src/components/ChallengeList.vue
index 8951226b..7572ede1 100644
--- a/client/src/components/ChallengeList.vue
+++ b/client/src/components/ChallengeList.vue
@@ -1,26 +1,81 @@
-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(v-if="c.to[0].id > 0")
- span(v-for="p in c.to") {{ p.name }}
- td(v-else) {{ c.nbPlayers - 1 }} player{{ c.nbPlayers >= 3 ? 's' : '' }}
- td {{ c.timeControl }}
+div
+ table
+ 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)")
-