Skip to content

Commit

Permalink
poll nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaomiDEV committed Feb 3, 2025
1 parent 022adf1 commit 1d5e182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/MessageBoardCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
<IonItem button detail="false" v-for="choice in props.boardMessage.poll.entries" @click="voteFor(choice)" :key="choice.choice">
<IonLabel>
<h3>{{ choice.choice }}</h3>
<p>{{ $t("messageBoard:polls.choice.desc", { count: choice.votes.length }) }} - {{ calcPercentageVoted(choice) * 100 }}%</p>
<p>{{ $t("messageBoard:polls.choice.desc", { count: choice.votes.length }) }} - {{ Math.floor(calcPercentageVoted(choice) * 100) }}%</p>
<div class="percentage" :style="{'--vote-percentage': (Math.max(0.005, calcPercentageVoted(choice)) * 100) + '%'}"></div>
</IonLabel>
</IonItem>
Expand Down
2 changes: 1 addition & 1 deletion src/modals/PollResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<SpinnerFullscreen v-if="!members" />
<IonContent v-else>
<IonList :inset="isIOS">
<template v-for="choice in props.poll.entries" :key="choice.choice">
<template v-for="choice in props.poll.entries.filter(x => x.votes.length)" :key="choice.choice">
<IonItemDivider sticky>
{{ choice.choice }} - {{ $t("messageBoard:polls.choice.desc", { count: choice.votes.length }) }}
</IonItemDivider>
Expand Down

0 comments on commit 1d5e182

Please sign in to comment.