From a2931d675abd36eae577cdd39547201e17dd782e Mon Sep 17 00:00:00 2001 From: Arc Date: Wed, 24 Dec 2025 05:32:27 +0000 Subject: [PATCH 1/4] fixup: ui --- static/components/stall-list.js | 8 + static/js/index.js | 3 +- .../nostrmarket/components/merchant-tab.html | 48 --- templates/nostrmarket/index.html | 402 +++++++++--------- 4 files changed, 210 insertions(+), 251 deletions(-) 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 e570dde..00560df 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: { @@ -114,6 +115,7 @@ window.app = Vue.createApp({ this.shippingZones = [] this.activeChatCustomer = '' this.showKeys = false + this.stallCount = 0 }, createMerchant: async function (privateKey) { try { @@ -378,7 +380,6 @@ window.app = Vue.createApp({ }, goToOrders: function (stallId) { this.selectedStallFilter = stallId - this.activeTab = 'orders' } }, created: async function () { diff --git a/templates/nostrmarket/components/merchant-tab.html b/templates/nostrmarket/components/merchant-tab.html index 0684c62..41caca1 100644 --- a/templates/nostrmarket/components/merchant-tab.html +++ b/templates/nostrmarket/components/merchant-tab.html @@ -28,19 +28,6 @@ > -
- - - Restart the connection to the nostrclient extension - - -
@@ -65,40 +52,5 @@
-
- - -
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 9f89808..596629d 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) - - - - -
@@ -177,6 +78,7 @@ @customer-selected-for-order="customerSelectedForOrder" @go-to-products="goToProducts" @go-to-orders="goToOrders" + @stalls-updated="stallCount = $event" > @@ -191,31 +93,23 @@ - - - - - - - - -
+ + +
Orders
+
+ + + + +
@@ -278,90 +172,194 @@
- - - - - - - - Restart Connection - - Reconnect to the nostrclient extension - - - - - - - - - Check Status - - Check connection to nostrclient - - - - - - - - Status: - - - - Relays:  - - of - - connected - - - - - - +
+
+ + + + + + + + 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. + +
+
+
- - -
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" %} - + + + +
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" %} + +
From 19dbe64e7f2951e78ee4416e9260c35a34497db0 Mon Sep 17 00:00:00 2001 From: Arc Date: Wed, 24 Dec 2025 05:33:27 +0000 Subject: [PATCH 2/4] make --- templates/nostrmarket/index.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/templates/nostrmarket/index.html b/templates/nostrmarket/index.html index 596629d..ac960e9 100644 --- a/templates/nostrmarket/index.html +++ b/templates/nostrmarket/index.html @@ -182,7 +182,11 @@ @click="restartNostrConnection" > - + @@ -193,7 +197,11 @@ - + @@ -351,9 +359,9 @@
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. + NIP-15 protocol. Create stalls, list products, and accept + Lightning payments while communicating with customers via + encrypted Nostr direct messages.
From cd0bca1c858360082be4b21723fc979b5f1d906a Mon Sep 17 00:00:00 2001 From: Arc Date: Wed, 24 Dec 2025 05:59:51 +0000 Subject: [PATCH 3/4] tweak --- .../components/direct-messages.html | 269 +++++++++--------- templates/nostrmarket/index.html | 28 +- 2 files changed, 150 insertions(+), 147 deletions(-) diff --git a/templates/nostrmarket/components/direct-messages.html b/templates/nostrmarket/components/direct-messages.html index 9f68511..88ae2c0 100644 --- a/templates/nostrmarket/components/direct-messages.html +++ b/templates/nostrmarket/components/direct-messages.html @@ -1,143 +1,146 @@
- -
-
-
Messages
-
-
-   new -
-
- Client Orders -
-
-
- - - - -
-
- - - -
-
- - Add a public key to chat with - -
-
-
- -
-
-
- + +
+
+   new +
+
+ Client Orders -
-
- New order: -
-
- Reply sent for order: -
-
- Paid - Shipped - -
-
- - - - -
- ... -
-
-
- - - + +
+
+ -