From 1f382676263cf9b1763cee6b85ee16ebd31022d0 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Tue, 6 Feb 2024 19:09:39 +0000 Subject: [PATCH] [CodeFactor] Apply fixes to commit 8d62550 --- gui/src/components/chat_messages_received.vue | 29 ++++++++++++------- gui/src/components/chat_messages_sent.vue | 28 ++++++++++++------ gui/src/js/messagesHandler.ts | 4 +-- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/gui/src/components/chat_messages_received.vue b/gui/src/components/chat_messages_received.vue index d641eb82..91d79ca6 100644 --- a/gui/src/components/chat_messages_received.vue +++ b/gui/src/components/chat_messages_received.vue @@ -2,13 +2,25 @@
- -
-
- - +
+
+ + +
-

{{ message.body }}

@@ -33,8 +45,6 @@ - - @@ -92,7 +102,7 @@ export default { const url = URL.createObjectURL(blob); // Creating a temporary anchor element to download the file - const anchor = document.createElement('a'); + const anchor = document.createElement("a"); anchor.href = url; anchor.download = fileName; document.body.appendChild(anchor); @@ -107,7 +117,6 @@ export default { }, }, computed: { - messageWidthClass() { // Calculate a Bootstrap grid class based on message length // Adjust the logic as needed to fit your requirements diff --git a/gui/src/components/chat_messages_sent.vue b/gui/src/components/chat_messages_sent.vue index 96667412..b7add3fc 100644 --- a/gui/src/components/chat_messages_sent.vue +++ b/gui/src/components/chat_messages_sent.vue @@ -2,7 +2,6 @@
- - +
+
+ + +
-
- -

{{ message.body }}

@@ -137,7 +147,7 @@ export default { const url = URL.createObjectURL(blob); // Creating a temporary anchor element to download the file - const anchor = document.createElement('a'); + const anchor = document.createElement("a"); anchor.href = url; anchor.download = fileName; document.body.appendChild(anchor); diff --git a/gui/src/js/messagesHandler.ts b/gui/src/js/messagesHandler.ts index 25b537ee..8d5850f6 100644 --- a/gui/src/js/messagesHandler.ts +++ b/gui/src/js/messagesHandler.ts @@ -78,7 +78,7 @@ function createSortedMessagesList(data: { } export function newMessage(dxcall, body, attachments) { - console.log(attachments) + console.log(attachments); sendFreedataMessage(dxcall, body, attachments); } @@ -102,5 +102,5 @@ export function requestMessageInfo(id) { } export async function getMessageAttachment(data_sha512) { - return await getFreedataAttachmentBySha512(data_sha512) + return await getFreedataAttachmentBySha512(data_sha512); }