From 1242b6986836622c5d1d1c1b9fa34a7089645d68 Mon Sep 17 00:00:00 2001 From: AndzejsP Date: Mon, 5 Jun 2023 13:47:07 +0300 Subject: [PATCH] reworked message layout --- web/src/components/Message.vue | 175 +++++++++++++++++++-------------- 1 file changed, 100 insertions(+), 75 deletions(-) diff --git a/web/src/components/Message.vue b/web/src/components/Message.vue index 68d455b7..5e0134d7 100644 --- a/web/src/components/Message.vue +++ b/web/src/components/Message.vue @@ -1,79 +1,104 @@ @@ -120,7 +145,7 @@ export default { }, methods: { copyContentToClipboard() { this.$emit('copy', this.message.content) - + }, deleteMsg() { this.$emit('delete', this.message.id) @@ -141,21 +166,21 @@ export default { resendMessage() { this.$emit('resendMessage', this.message.id, this.new_message_content) }, - getImgUrl() { - + getImgUrl() { + if (this.message.sender == "user") { if (this.avatar) { - + return this.avatar } - + return userImgPlaceholder; } - if(this.avatar){ - return bUrl + this.avatar - } - return botImgPlaceholder; + if (this.avatar) { + return bUrl + this.avatar + } + return botImgPlaceholder; }, defaultImg(event) {