diff options
author | Marco Ambrosini <marcoambrosini@icloud.com> | 2022-08-26 17:47:13 +0300 |
---|---|---|
committer | Marco Ambrosini <marcoambrosini@icloud.com> | 2022-08-26 17:47:13 +0300 |
commit | 6480a9e043575cd26c7592d17de5dbddba485e4d (patch) | |
tree | a082dd20f34903bfb4ed2bff63e6f2932aaa5b53 | |
parent | 9d2ee6d56a3d778693593bdfba0e999a3d512c14 (diff) |
Do not display results summary if poll is public
Signed-off-by: Marco Ambrosini <marcoambrosini@icloud.com>
-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 }, |