From d6bffbeaa95cb1d07e7b94126780e2e11b82f0a6 Mon Sep 17 00:00:00 2001 From: Justin Ferrari <‘justinwesleyferrari@gmail.com’> Date: Sat, 29 Oct 2022 10:51:02 -0500 Subject: [PATCH] Started UI Fixes --- .../plugins/core/components/ChatModals.js | 34 +++--- .../plugins/core/components/ChatPage.js | 106 +++++++++--------- .../core/components/ChatWelcomePage.js | 97 ++++++++-------- .../plugins/core/components/NameMenu.js | 6 +- 4 files changed, 125 insertions(+), 118 deletions(-) diff --git a/qortal-ui-plugins/plugins/core/components/ChatModals.js b/qortal-ui-plugins/plugins/core/components/ChatModals.js index b7370ef3..c9daf3b4 100644 --- a/qortal-ui-plugins/plugins/core/components/ChatModals.js +++ b/qortal-ui-plugins/plugins/core/components/ChatModals.js @@ -92,11 +92,11 @@ class ChatModals extends LitElement { // Send Private Message _sendMessage() { - this.isLoading = true + this.isLoading = true; - const recipient = this.shadowRoot.getElementById('sendTo').value - const messageBox = this.shadowRoot.getElementById('messageBox') - const messageText = messageBox.value + const recipient = this.shadowRoot.getElementById('sendTo').value; + const messageBox = this.shadowRoot.getElementById('messageBox'); + const messageText = messageBox.value; if (recipient.length === 0) { this.isLoading = false @@ -105,22 +105,21 @@ class ChatModals extends LitElement { } else { this.sendMessage() } - } + }; async sendMessage() { - this.isLoading = true - - const _recipient = this.shadowRoot.getElementById('sendTo').value - const messageBox = this.shadowRoot.getElementById('messageBox') - const messageText = messageBox.value - let recipient + this.isLoading = true; + const _recipient = this.shadowRoot.getElementById('sendTo').value; + const messageBox = this.shadowRoot.getElementById('messageBox'); + const messageText = messageBox.value; + let recipient; const validateName = async (receiverName) => { - let myRes + let myRes; let myNameRes = await parentEpml.request('apiCall', { type: 'api', url: `/names/${receiverName}` - }) + }); if (myNameRes.error === 401) { myRes = false @@ -128,7 +127,7 @@ class ChatModals extends LitElement { myRes = myNameRes } - return myRes + return myRes; } const myNameRes = await validateName(_recipient) @@ -139,7 +138,6 @@ class ChatModals extends LitElement { recipient = myNameRes.owner } - let _reference = new Uint8Array(64); window.crypto.getRandomValues(_reference); @@ -367,7 +365,11 @@ class ChatModals extends LitElement {
-