Skip to content

Commit

Permalink
fix: Restore back missing feature where choices for pending shutter p…
Browse files Browse the repository at this point in the history
…roposals are visible (#1058)
  • Loading branch information
wa0x6e authored Dec 17, 2024
1 parent b00ba79 commit 2141ea1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions apps/ui/src/components/ProposalResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ const otherResultsSummary = computed(() => {

<template>
<div
v-if="!!props.proposal.privacy && !props.proposal.completed && withDetails"
v-if="
!!props.proposal.privacy &&
props.proposal.state === 'active' &&
withDetails
"
>
<div class="mb-1">
All votes are encrypted and will be decrypted only after the voting period
Expand Down Expand Up @@ -154,10 +158,16 @@ const otherResultsSummary = computed(() => {
class="truncate grow"
v-text="proposal.choices[result.choice - 1]"
/>
<div>
{{ _vp(result.score / 10 ** decimals) }}
</div>
<div v-text="_p(result.progress / 100)" />
<IH-lock-closed
v-if="!!proposal.privacy && !proposal.completed"
class="size-[16px] shrink-0"
/>
<template v-else>
<div>
{{ _vp(result.score / 10 ** decimals) }}
</div>
<div v-text="_p(result.progress / 100)" />
</template>
</div>
<button
v-if="!displayAllChoices && otherResultsSummary.count > 0"
Expand Down

0 comments on commit 2141ea1

Please sign in to comment.