Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Ambrosini <marcoambrosini@icloud.com>2022-08-26 15:30:10 +0300
committerMarco Ambrosini <marcoambrosini@icloud.com>2022-08-26 15:30:10 +0300
commit2694da36edc23fa561c80c3d7538867a6b8c44b2 (patch)
tree48080c6a459566160ae36361d7a02ebdde1707ac /src/components
parentf9db4689a00be6925d389ff4f3f36e25408698aa (diff)
Display your votes in results page
Signed-off-by: Marco Ambrosini <marcoambrosini@icloud.com>
Diffstat (limited to 'src/components')
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue
index 8925a3163..b6f17f71b 100644
--- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue
+++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue
@@ -110,7 +110,12 @@
{{ getVotePercentage(index) + '%' }}
</p>
</div>
- <NcProgressBar :value="getVotePercentage(index)" size="medium" />
+ <p v-if="selfHasVotedOption(index)" class="results__option-subtitle">
+ {{ t('spreed','You voted') }}
+ </p>
+ <NcProgressBar class="results__option-progress"
+ :value="getVotePercentage(index)"
+ size="medium" />
</div>
</div>
<div v-if="pollIsOpen"
@@ -384,6 +389,14 @@ export default {
pollId: this.id,
})
},
+
+ selfHasVotedOption(index) {
+ if (this.votedSelf.includes(index)) {
+ return true
+ } else {
+ return false
+ }
+ },
},
}
</script>
@@ -471,7 +484,13 @@ export default {
.results__option {
display: flex;
flex-direction: column;
- gap: 8px;
+ &-subtitle {
+ color: var(--color-text-maxcontrast);
+ }
+
+ &-progress {
+ margin-top: 4px;
+ }
}
.results__option-title {