aboutsummaryrefslogtreecommitdiff
path: root/src/components/poll
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2024-03-25 16:54:40 +0200
committerHenry Jameson <me@hjkos.com>2024-03-25 16:54:40 +0200
commite51278cdf11f8b77bc436d6076685283f0a2ad02 (patch)
tree2330420db14d8365b99798aad0ba8b6ccd7f6a1f /src/components/poll
parentb925c32e67d05a958a980d94c2b0d467e2c73125 (diff)
parent23edfe7b918844f8cc2ff5b9b245952092ee1cbf (diff)
Merge remote-tracking branch 'origin/develop' into themes3
Diffstat (limited to 'src/components/poll')
-rw-r--r--src/components/poll/poll.js2
-rw-r--r--src/components/poll/poll.vue9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/components/poll/poll.js b/src/components/poll/poll.js
index f6001f56..9ce0e29e 100644
--- a/src/components/poll/poll.js
+++ b/src/components/poll/poll.js
@@ -38,7 +38,7 @@ export default {
return (this.poll && this.poll.options) || []
},
expiresAt () {
- return (this.poll && this.poll.expires_at) || 0
+ return (this.poll && this.poll.expires_at) || null
},
expired () {
return (this.poll && this.poll.expired) || false
diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue
index 2e163938..580e5377 100644
--- a/src/components/poll/poll.vue
+++ b/src/components/poll/poll.vue
@@ -78,13 +78,16 @@
</button>
<div class="total">
<template v-if="typeof poll.voters_count === 'number'">
- {{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }}&nbsp;·&nbsp;
+ {{ $tc("polls.people_voted_count", poll.voters_count, { count: poll.voters_count }) }}
</template>
<template v-else>
- {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }}&nbsp;·&nbsp;
+ {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }}
</template>
+ <span v-if="expiresAt !== null">
+ &nbsp;·&nbsp;
+ </span>
</div>
- <span>
+ <span v-if="expiresAt !== null">
<i18n-t
scope="global"
:keypath="expired ? 'polls.expired' : 'polls.expires_in'"