Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update poll #3111

Merged
merged 4 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: refresh poll layout
Clovis committed Dec 30, 2024
commit 9c8c8242380a7e9f10c750e2f4f55c4104860261
24 changes: 14 additions & 10 deletions components/status/StatusPoll.vue
Original file line number Diff line number Diff line change
@@ -87,19 +87,23 @@ const votersCount = computed(() => poll.votersCount ?? poll.votesCount ?? 0)
</div>
</div>
</template>
<div text-sm text-secondary flex justify-between items-center>
<div flex="~ inline" gap-x-1>
<CommonLocalizedNumber
keypath="status.poll.count"
:count="poll.votesCount"
/>
<div text-sm text-secondary flex justify-between items-center gap-3>
<div flex gap-x-1 flex-wrap>
<div inline-block>
<CommonLocalizedNumber
keypath="status.poll.count"
:count="poll.votesCount"
/>
</div>
&middot;
<CommonTooltip v-if="poll.expiresAt" :content="expiredTimeFormatted" class="inline-block" placement="right">
<time :datetime="poll.expiresAt!">{{ $t(poll.expired ? 'status.poll.finished' : 'status.poll.ends', [expiredTimeAgo]) }}</time>
</CommonTooltip>
<div inline-block>
<CommonTooltip v-if="poll.expiresAt" :content="expiredTimeFormatted" class="inline-block" placement="right">
<time :datetime="poll.expiresAt!">{{ $t(poll.expired ? 'status.poll.finished' : 'status.poll.ends', [expiredTimeAgo]) }}</time>
</CommonTooltip>
</div>
</div>
<div>
<button flex gap-1 items-center hover:text-primary @click="refresh">
<button whitespace-nowrap flex gap-1 items-center hover:text-primary @click="refresh">
<div text-xs :class="loading ? 'animate-spin' : ''" i-ri:loop-right-line />
{{ $t('status.poll.update') }}
</button>