Hide the expiry date indication if the poll never expires
Signed-off-by: SyoBoN <syobon@syobon.net>
This commit is contained in:
parent
9042792133
commit
062323c0d5
@ -38,7 +38,7 @@ export default {
|
|||||||
return (this.poll && this.poll.options) || []
|
return (this.poll && this.poll.options) || []
|
||||||
},
|
},
|
||||||
expiresAt () {
|
expiresAt () {
|
||||||
return (this.poll && this.poll.expires_at) || 0
|
return (this.poll && this.poll.expires_at) || null
|
||||||
},
|
},
|
||||||
expired () {
|
expired () {
|
||||||
return (this.poll && this.poll.expired) || false
|
return (this.poll && this.poll.expired) || false
|
||||||
|
@ -75,13 +75,16 @@
|
|||||||
</button>
|
</button>
|
||||||
<div class="total">
|
<div class="total">
|
||||||
<template v-if="typeof poll.voters_count === 'number'">
|
<template v-if="typeof poll.voters_count === 'number'">
|
||||||
{{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }} ·
|
{{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} ·
|
{{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }}
|
||||||
</template>
|
</template>
|
||||||
|
<span v-if="expiresAt !== null">
|
||||||
|
·
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<span>
|
<span v-if="expiresAt !== null">
|
||||||
<i18n-t
|
<i18n-t
|
||||||
scope="global"
|
scope="global"
|
||||||
:keypath="expired ? 'polls.expired' : 'polls.expires_in'"
|
:keypath="expired ? 'polls.expired' : 'polls.expires_in'"
|
||||||
|
Loading…
Reference in New Issue
Block a user