diff options
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue index 2a22db4a5..3b94890d0 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue @@ -111,7 +111,12 @@ </h2> </div> <div class="poll__summary"> - {{ n('spreed', 'Poll results • %n vote', 'Poll results • %n votes', votersNumber) }} + <template v-if="currentUserIsPollCreator || currentUserIsModerator || pollIsPublic"> + {{ n('spreed', 'Poll results • %n vote', 'Poll results • %n votes', votersNumber) }} + </template> + <template v-else-if="selfHasVoted"> + {{ t('spreed', 'Poll ・ You voted') }} + </template> </div> <div class="results__options"> <div v-for="(option, index) in options" @@ -251,6 +256,10 @@ export default { return this.pollLoaded ? this.poll.resultMode : undefined }, + pollIsPublic() { + return this.resultMode === 0 + }, + status() { return this.pollLoaded ? this.poll.status : undefined }, |