diff --git a/frontend/package.json b/frontend/package.json index d7386ef..dbeffc0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,12 +1,12 @@ { "name": "colubrina", - "version": "1.0.23", + "version": "1.0.24", "description": "Simple instant communication.", "private": true, "author": "Troplo ", "scripts": { "serve": "vue-cli-service serve", - "build": "vue-cli-service build", + "build": "vue-cli-service build --no-clean", "lint": "vue-cli-service lint", "electron:build": "vue-cli-service electron:build", "electron:serve": "vue-cli-service electron:serve", diff --git a/frontend/src/components/Message.vue b/frontend/src/components/Message.vue index 76e696c..de270cd 100644 --- a/frontend/src/components/Message.vue +++ b/frontend/src/components/Message.vue @@ -974,12 +974,13 @@ export default { return this.message.poll.options.map((option) => { return { id: option.id, - percentage: + percentage: Math.round( ((this.message.poll.answers?.filter( (answer) => answer?.answer === option.id ).length || 0) / this.message.poll.answers.length) * 100 || 0 + ) } }) }, diff --git a/frontend/src/views/Communications/CommunicationsChat.vue b/frontend/src/views/Communications/CommunicationsChat.vue index e26ede1..3b9ee19 100644 --- a/frontend/src/views/Communications/CommunicationsChat.vue +++ b/frontend/src/views/Communications/CommunicationsChat.vue @@ -1064,6 +1064,7 @@ export default { }) }, async getMessages() { + this.loadingMessages = true this.autoScroll() await this.axios .get( @@ -1232,13 +1233,13 @@ export default { drafts[oldVal] = "" } this.message = drafts[val] || "" - this.messages = [] this.usersTyping = [] this.replying = null this.reachedTop = false this.avoidAutoScroll = false this.offset = 0 this.pins = [] + this.messages = [] this.getMessages() } },