Move poll state handling to its own module

This commit is contained in:
Shpuld Shpludson 2019-06-20 13:02:04 +00:00
parent eca533aab6
commit e5e9bb27f3
6 changed files with 96 additions and 34 deletions

View file

@ -2,7 +2,7 @@
<div class="poll" v-bind:class="containerClass">
<div
class="poll-option"
v-for="(option, index) in poll.options"
v-for="(option, index) in options"
:key="index"
>
<div v-if="showResults" :title="resultTitle(option)" class="option-result">
@ -50,7 +50,7 @@
{{totalVotesCount}} {{ $t("polls.votes") }}&nbsp;·&nbsp;
</div>
<i18n :path="expired ? 'polls.expired' : 'polls.expires_in'">
<Timeago :time="this.poll.expires_at" :auto-update="60" :now-threshold="0" />
<Timeago :time="this.expiresAt" :auto-update="60" :now-threshold="0" />
</i18n>
</div>
</div>