projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some changes to the logic in Rules.vue: weird behavior, TODO
[vchess.git]
/
client
/
src
/
components
/
ChallengeList.vue
diff --git
a/client/src/components/ChallengeList.vue
b/client/src/components/ChallengeList.vue
index
a52e0ca
..
bee328f
100644
(file)
--- a/
client/src/components/ChallengeList.vue
+++ b/
client/src/components/ChallengeList.vue
@@
-1,34
+1,22
@@
<template lang="pug">
table
tr
<template lang="pug">
table
tr
- th
(v-if="showVariant")
Variant
+ th Variant
th From
th To
th Cadence
th From
th To
th Cadence
- th(v-if="showNbPlayers") Number of players
tr(v-for="c in challenges" @click="$emit('click-challenge',c)")
tr(v-for="c in challenges" @click="$emit('click-challenge',c)")
- td
(v-if="showVariant") {{ c.variant
}}
+ td
{{ c.vname
}}
td {{ c.from.name }}
td {{ c.from.name }}
- td
- span(v-for="p in c.to") {{ p.name }}
- td {{ c.mainTime }} + {{ c.increment }}
- td(v-if="showNbPlayers") {{ c.nbPlayers }}
+ td {{ c.to }}
+ td {{ c.timeControl }}
</template>
<script>
export default {
name: "my-challenge-list",
props: ["challenges"],
</template>
<script>
export default {
name: "my-challenge-list",
props: ["challenges"],
- computed: {
- showVariant: function() {
- this.challenges.length > 0 && !!this.challenges[0].variant;
- },
- showNbPlayers: function() {
- this.challenges.length > 0 && !!this.challenges[0].nbPlayers;
- },
- },
};
};
-// TODO: challenge format from/to ou uid/players ............
</script>
<style lang="sass">
</script>
<style lang="sass">