From 10a1a28d0430d795115e4cd0e5a658b80f1f5f0b Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Wed, 21 Dec 2022 18:35:53 +0000 Subject: [PATCH] make chat work again + some weird formatting... again --- .../extensions/shop/templates/shop/index.html | 18 +++++++++++------- .../extensions/shop/templates/shop/order.html | 5 +++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lnbits/extensions/shop/templates/shop/index.html b/lnbits/extensions/shop/templates/shop/index.html index 7a6a5899..9bc135e6 100644 --- a/lnbits/extensions/shop/templates/shop/index.html +++ b/lnbits/extensions/shop/templates/shop/index.html @@ -1242,19 +1242,22 @@ this.newMessage = '' this.$refs.newMessage.focus() }, - async sendMessage() { - let orderPublicKey = this.orders.find( + sendMessage() { + // we need Buffer to make this play nice + + /*let orderPublicKey = this.orders.find( o => o.invoiceid == this.customerKey - ).pubkey - let ciphertext = nostr.nip04.encrypt( + ).pubkey*/ + + /*let ciphertext = nostr.nip04.encrypt( this.keys.privkey, orderPublicKey, this.newMessage - ) + )*/ let message = { - msg: ciphertext, - pubkey: this.keys.publickey + msg: this.newMessage, + pubkey: this.keys.pubkey } // if diagon alley mode is active create a propper event @@ -1373,6 +1376,7 @@ padding: 1rem; overflow-y: auto; margin-left: auto; + width: 50%; } .chat-messages { diff --git a/lnbits/extensions/shop/templates/shop/order.html b/lnbits/extensions/shop/templates/shop/order.html index dc5a3c51..ab633b54 100644 --- a/lnbits/extensions/shop/templates/shop/order.html +++ b/lnbits/extensions/shop/templates/shop/order.html @@ -2,7 +2,7 @@
-
+
@@ -489,7 +489,7 @@ display: grid; grid-template-rows: 1fr auto; /*height: calc(100vh - 200px);*/ - height: 50vh; + height: 70vh; } .chat-box { @@ -498,6 +498,7 @@ padding: 1rem; overflow-y: auto; margin-left: auto; + width: 50%; } .chat-messages {