diff --git a/static/components/stall-list.js b/static/components/stall-list.js
index 0cdfb04..220b5c1 100644
--- a/static/components/stall-list.js
+++ b/static/components/stall-list.js
@@ -74,6 +74,9 @@ window.app.component('stall-list', {
}
},
methods: {
+ emitStallCount: function () {
+ this.$emit('stalls-updated', this.stalls.length)
+ },
sendStallFormData: async function () {
const stallData = {
name: this.stallDialog.data.name,
@@ -101,6 +104,7 @@ window.app.component('stall-list', {
)
this.stallDialog.show = false
this.stalls.unshift(data)
+ this.emitStallCount()
this.$q.notify({
type: 'positive',
message: 'Stall created!'
@@ -120,6 +124,7 @@ window.app.component('stall-list', {
)
this.stallDialog.show = false
this.stalls.unshift(data)
+ this.emitStallCount()
this.$q.notify({
type: 'positive',
message: 'Stall restored!'
@@ -151,6 +156,7 @@ window.app.component('stall-list', {
if (index !== -1) {
this.stalls.splice(index, 1, data)
}
+ this.emitStallCount()
this.$q.notify({
type: 'positive',
message: 'Stall updated!'
@@ -168,6 +174,7 @@ window.app.component('stall-list', {
)
this.stalls = this.stalls.filter(s => s.id !== stall.id)
this.pendingStalls = this.pendingStalls.filter(s => s.id !== stall.id)
+ this.emitStallCount()
this.$q.notify({
type: 'positive',
message: 'Stall deleted'
@@ -291,6 +298,7 @@ window.app.component('stall-list', {
},
created: async function () {
this.stalls = await this.getStalls()
+ this.emitStallCount()
this.currencies = this.getCurrencies()
this.zoneOptions = await this.getZones()
}
diff --git a/static/js/index.js b/static/js/index.js
index 7bad45b..e2421c2 100644
--- a/static/js/index.js
+++ b/static/js/index.js
@@ -12,6 +12,7 @@ window.app = Vue.createApp({
activeChatCustomer: '',
orderPubkey: null,
showKeys: false,
+ stallCount: 0,
importKeyDialog: {
show: false,
data: {
@@ -140,6 +141,7 @@ window.app = Vue.createApp({
this.shippingZones = []
this.activeChatCustomer = ''
this.showKeys = false
+ this.stallCount = 0
},
createMerchant: async function (privateKey) {
try {
@@ -404,7 +406,6 @@ window.app = Vue.createApp({
},
goToOrders: function (stallId) {
this.selectedStallFilter = stallId
- this.activeTab = 'orders'
}
},
created: async function () {
diff --git a/templates/nostrmarket/components/direct-messages.html b/templates/nostrmarket/components/direct-messages.html
index 9f68511..602eb8b 100644
--- a/templates/nostrmarket/components/direct-messages.html
+++ b/templates/nostrmarket/components/direct-messages.html
@@ -1,143 +1,147 @@
-
-
-
-
Messages
-
-
- new
-
-
- Client Orders
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Add a public key to chat with
-
-
-
-
-
-
-
-
-
+
+
+
+ new
+
+
+
Client Orders
-
-
- New order:
-
-
- Reply sent for order:
-
-
- Paid
- Shipped
-
-
-
-
-
-
-
-
-
...
-
-
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+ Add a public key to chat with
+
+
+
+
+
+
+
+
+
+
+
+ New order:
+
+
+ Reply sent for order:
+
+
+ Paid
+
+ Shipped
+
+
+
+
+
+
+
+
+
...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/templates/nostrmarket/components/merchant-tab.html b/templates/nostrmarket/components/merchant-tab.html
index 711f447..3d932d2 100644
--- a/templates/nostrmarket/components/merchant-tab.html
+++ b/templates/nostrmarket/components/merchant-tab.html
@@ -257,41 +257,6 @@
-
-
-
- Nostr Market Extension
-
-
-
-
-
-
-
- A decentralized marketplace powered by Nostr and Lightning
- Network. Create stalls, add products, and start selling with
- Bitcoin.
-
-
-
-
-
-
- Open Market Client
-
-
-
-
-
-
-
diff --git a/templates/nostrmarket/index.html b/templates/nostrmarket/index.html
index 55614a5..8f4e7b4 100644
--- a/templates/nostrmarket/index.html
+++ b/templates/nostrmarket/index.html
@@ -1,7 +1,7 @@
{% extends "base.html" %} {% from "macros.jinja" import window_vars with context
%} {% block page %}
-
+
@@ -36,106 +36,7 @@
icon="inventory_2"
style="min-width: 120px"
>
-
-
-
-
-
-
-
-
-
-
- Publish NIP-15
- Publish stalls and products
-
-
-
-
-
-
-
- Publish NIP-99
- Classified listings (coming soon)
-
-
-
-
-
-
-
-
- Refresh NIP-15 from Nostr
- Sync stalls and products
-
-
-
-
-
-
-
- Refresh NIP-99 from Nostr
- Classified listings (coming soon)
-
-
-
-
-
-
-
-
- Delete NIP-15 from Nostr
- Remove stalls and products
-
-
-
-
-
-
-
- Delete NIP-99 from Nostr
- Classified listings (coming soon)
-
-
-
-
-
@@ -181,6 +82,7 @@
@customer-selected-for-order="customerSelectedForOrder"
@go-to-products="goToProducts"
@go-to-orders="goToOrders"
+ @stalls-updated="stallCount = $event"
>
@@ -195,31 +97,23 @@
-
-
-
-
-
-
-
-
-
+
+
+ Orders
+
+
+
+
+
+
@@ -278,94 +172,178 @@
-
+
-
-
-
-
-
-
-
- Restart Connection
-
- Reconnect to the nostrclient extension
-
-
-
-
-
-
-
-
- Check Status
-
- Check connection to nostrclient
-
-
-
-
-
-
-
- Status:
-
-
-
+
+
+
+
- Relays:
-
- of
-
- connected
-
-
-
-
-
-
-
-
-
-
-
-
-
- Nostr Market
-
- A decentralized marketplace extension for LNbits implementing the
- NIP-15 protocol. Create stalls, list products, and accept Lightning
- payments while communicating with customers via encrypted Nostr
- direct messages.
+
+
+
+
+ Restart Connection
+
+ Reconnect to the nostrclient extension
+
+
+
+
+
+
+
+
+ Check Status
+
+ Check connection to nostrclient
+
+
+
+
+
+
+
+ Status:
+
+
+
+ Relays:
+
+ of
+
+ connected
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Publish NIP-15
+ Publish stalls and products
+
+
+
+
+
+
+
+ Publish NIP-99
+ Classified listings (coming soon)
+
+
+
+
+
+
+
+
+ Refresh NIP-15 from Nostr
+ Sync stalls and products
+
+
+
+
+
+
+
+ Refresh NIP-99 from Nostr
+ Classified listings (coming soon)
+
+
+
+
+
+
+
+
+ Delete NIP-15 from Nostr
+ Remove stalls and products
+
+
+
+
+
+
+
+ Delete NIP-99 from Nostr
+ Classified listings (coming soon)
+
+
+
+
+
+ First create a stall and add products.
+
+
+
-
- {% include "nostrmarket/_api_docs.html" %}
-
@@ -380,6 +358,34 @@
>
+
+
+
+
+
+ Nostr Market
+
+ A decentralized marketplace extension for LNbits implementing the
+ NIP-15 protocol. Create stalls, list products, and accept
+ Lightning payments while communicating with customers via
+ encrypted Nostr direct messages.
+
+
+
+ {% include "nostrmarket/_api_docs.html" %}
+
+
+
+