diff options
author | Marco Ambrosini <marcoambrosini@icloud.com> | 2022-08-26 14:36:32 +0300 |
---|---|---|
committer | Marco Ambrosini <marcoambrosini@icloud.com> | 2022-08-26 14:36:32 +0300 |
commit | 8689bbc8760c624f675a1b5cffa8baaebcdf795d (patch) | |
tree | 1cc264c8130fd0ff0eb65a071d05618a0519878e /src/components | |
parent | 5d16f9d207edb4d8267ad54904e6f6ff2d2dd890 (diff) |
Fix footer text
Signed-off-by: Marco Ambrosini <marcoambrosini@icloud.com>
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue index ead9d8ac9..abee7dbe7 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/Poll.vue @@ -33,7 +33,7 @@ </p> </div> <div class="poll__footer"> - {{ selfHasVoted ? t('spreed', 'Poll ・ You voted') : t('spreed', 'Poll ・ Click to vote') }} + {{ pollFooterText }} </div> </a> @@ -234,6 +234,10 @@ export default { return this.status === 0 }, + pollIsClosed() { + return this.status === 1 + }, + checkboxRadioSwitchType() { if (this.pollLoaded) { return this.poll.maxVotes === 0 ? 'checkbox' : 'radio' @@ -292,6 +296,15 @@ export default { canEndPoll() { return this.currentUserIsPollCreator || this.currentUserIsModerator }, + + pollFooterText() { + if (this.pollIsOpen) { + return this.selfHasVoted ? t('spreed', 'Poll ・ You voted') : t('spreed', 'Poll ・ Click to vote') + } else if (this.pollIsClosed) { + return t('spreed', 'Poll ・ Closed') + } + return '' + }, }, watch: { |