fix: Vue error
This commit is contained in:
parent
a719517b9c
commit
7c6feca831
2 changed files with 13 additions and 7 deletions
|
|
@ -2,7 +2,7 @@ async function directMessages(path) {
|
|||
const template = await loadTemplateAsync(path)
|
||||
Vue.component('direct-messages', {
|
||||
name: 'direct-messages',
|
||||
props: ['active-public-key', 'adminkey', 'inkey'],
|
||||
props: ['adminkey', 'inkey'],
|
||||
template,
|
||||
|
||||
watch: {
|
||||
|
|
@ -13,6 +13,7 @@ async function directMessages(path) {
|
|||
data: function () {
|
||||
return {
|
||||
customers: [],
|
||||
activePublicKey: null,
|
||||
messages: [],
|
||||
newMessage: ''
|
||||
}
|
||||
|
|
@ -31,10 +32,7 @@ async function directMessages(path) {
|
|||
this.inkey
|
||||
)
|
||||
this.messages = data
|
||||
console.log(
|
||||
'### this.messages',
|
||||
this.messages.map(m => m.message)
|
||||
)
|
||||
|
||||
this.focusOnChatBox(this.messages.length - 1)
|
||||
} catch (error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
|
|
@ -48,7 +46,6 @@ async function directMessages(path) {
|
|||
this.inkey
|
||||
)
|
||||
this.customers = data
|
||||
console.log('### customers', this.customers)
|
||||
} catch (error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,15 @@
|
|||
></stall-list>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<q-card class="q-mt-lg">
|
||||
<q-card-section>
|
||||
<div class="row">
|
||||
<div class="col-2"></div>
|
||||
<div class="col-8"></div>
|
||||
<div class="col-2"></div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
<q-card v-else>
|
||||
<q-card-section>
|
||||
|
|
@ -133,10 +142,10 @@
|
|||
</div>
|
||||
<div v-if="merchant && merchant.id" class="col-12">
|
||||
<direct-messages
|
||||
:active-public-key="activeChatCustomer"
|
||||
:inkey="g.user.wallets[0].inkey"
|
||||
:adminkey="g.user.wallets[0].adminkey"
|
||||
>
|
||||
<!-- :active-public-key="activeChatCustomer" -->
|
||||
</direct-messages>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue