Can create, send and accept challenge. Next step: targetted, launch game
[vchess.git] / client / src / components / ChallengeList.vue
CommitLineData
85e5b5c1
BA
1<template lang="pug">
2table
3 tr
03608482 4 th Variant
85e5b5c1
BA
5 th From
6 th To
7 th Cadence
85e5b5c1 8 tr(v-for="c in challenges" @click="$emit('click-challenge',c)")
bb7dd7db 9 td {{ c.vname }}
85e5b5c1 10 td {{ c.from.name }}
bb7dd7db
BA
11 td(v-if="!!c.to[0]")
12 span(v-for="pname in c.to") {{ pname }}
13 td(v-else) {{ c.to.length - 1 }} player{{ c.to.length >= 3 ? 's' : '' }}
03608482 14 td {{ c.timeControl }}
85e5b5c1
BA
15</template>
16
17<script>
18export default {
19 name: "my-challenge-list",
20 props: ["challenges"],
85e5b5c1 21};
85e5b5c1
BA
22</script>
23
24<style lang="sass">
25// TODO: affichage bizarre sur petits écrans <=767px
26</style>