From 08e71e28e38fa5eb4b4a1e4caf0f75df0485411c Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 29 Mar 2023 16:38:12 +0300 Subject: [PATCH] feat: navigate from customer to chat --- static/components/direct-messages/direct-messages.js | 5 ++++- templates/nostrmarket/index.html | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static/components/direct-messages/direct-messages.js b/static/components/direct-messages/direct-messages.js index 23d5ca2..ba965c5 100644 --- a/static/components/direct-messages/direct-messages.js +++ b/static/components/direct-messages/direct-messages.js @@ -2,10 +2,13 @@ async function directMessages(path) { const template = await loadTemplateAsync(path) Vue.component('direct-messages', { name: 'direct-messages', - props: ['adminkey', 'inkey'], + props: ['active-chat-customer', 'adminkey', 'inkey'], template, watch: { + activeChatCustomer: async function (n) { + this.activePublicKey = n + }, activePublicKey: async function (n) { await this.getDirectMessages(n) } diff --git a/templates/nostrmarket/index.html b/templates/nostrmarket/index.html index 051f524..74e9af8 100644 --- a/templates/nostrmarket/index.html +++ b/templates/nostrmarket/index.html @@ -148,8 +148,9 @@ - +