make chat work again + some weird formatting... again

This commit is contained in:
Tiago Vasconcelos 2022-12-21 18:35:53 +00:00
parent b59fa77dbd
commit 10a1a28d04
2 changed files with 14 additions and 9 deletions

View File

@ -1242,19 +1242,22 @@
this.newMessage = '' this.newMessage = ''
this.$refs.newMessage.focus() this.$refs.newMessage.focus()
}, },
async sendMessage() { sendMessage() {
let orderPublicKey = this.orders.find( // we need Buffer to make this play nice
/*let orderPublicKey = this.orders.find(
o => o.invoiceid == this.customerKey o => o.invoiceid == this.customerKey
).pubkey ).pubkey*/
let ciphertext = nostr.nip04.encrypt(
/*let ciphertext = nostr.nip04.encrypt(
this.keys.privkey, this.keys.privkey,
orderPublicKey, orderPublicKey,
this.newMessage this.newMessage
) )*/
let message = { let message = {
msg: ciphertext, msg: this.newMessage,
pubkey: this.keys.publickey pubkey: this.keys.pubkey
} }
// if diagon alley mode is active create a propper event // if diagon alley mode is active create a propper event
@ -1373,6 +1376,7 @@
padding: 1rem; padding: 1rem;
overflow-y: auto; overflow-y: auto;
margin-left: auto; margin-left: auto;
width: 50%;
} }
.chat-messages { .chat-messages {

View File

@ -2,7 +2,7 @@
<div class="row q-col-gutter-md flex"> <div class="row q-col-gutter-md flex">
<div class="col-12 col-md-7 col-lg-6 q-gutter-y-md"> <div class="col-12 col-md-7 col-lg-6 q-gutter-y-md">
<q-card> <q-card>
<div class="chat-container"> <div class="chat-container q-pa-md">
<div class="chat-box"> <div class="chat-box">
<!-- <p v-if="Object.keys(messages).length === 0">No messages yet</p> --> <!-- <p v-if="Object.keys(messages).length === 0">No messages yet</p> -->
<div class="chat-messages"> <div class="chat-messages">
@ -489,7 +489,7 @@
display: grid; display: grid;
grid-template-rows: 1fr auto; grid-template-rows: 1fr auto;
/*height: calc(100vh - 200px);*/ /*height: calc(100vh - 200px);*/
height: 50vh; height: 70vh;
} }
.chat-box { .chat-box {
@ -498,6 +498,7 @@
padding: 1rem; padding: 1rem;
overflow-y: auto; overflow-y: auto;
margin-left: auto; margin-left: auto;
width: 50%;
} }
.chat-messages { .chat-messages {