From 800619df9f537da244e778072402a6475a71a77d Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Thu, 2 Mar 2023 15:37:21 +0000 Subject: [PATCH] add customer stall component, remove toolbar --- .../customer-stall/customer-stall.html | 102 ++++++++++++ .../customer-stall/customer-stall.js | 17 ++ templates/nostrmarket/market.html | 145 ++++++++++++++++-- 3 files changed, 249 insertions(+), 15 deletions(-) create mode 100644 static/components/customer-stall/customer-stall.html create mode 100644 static/components/customer-stall/customer-stall.js diff --git a/static/components/customer-stall/customer-stall.html b/static/components/customer-stall/customer-stall.html new file mode 100644 index 0000000..c99290e --- /dev/null +++ b/static/components/customer-stall/customer-stall.html @@ -0,0 +1,102 @@ +
+ + + + + + + + +
+
+ + + + + Add to cart +
+
+ {{ item.name }} +
+
+ + +
+ + +
+
+ {{ item.stallName }} +
+ + {{ item.price }} satsBTC {{ (item.price / 1e8).toFixed(8) }} + + + {{ item.formatedPrice }} + ({{ item.priceInSats }} sats) + + {{ item.amount }} left +
+
+ {{cat}} +
+
+

{{ item.description }}

+
+
+ + + + + Stall: {{ item.stallName }} +
+ See product +
+
+
+
+
+
diff --git a/static/components/customer-stall/customer-stall.js b/static/components/customer-stall/customer-stall.js new file mode 100644 index 0000000..5b4f778 --- /dev/null +++ b/static/components/customer-stall/customer-stall.js @@ -0,0 +1,17 @@ +async function customerStall(path) { + const template = await loadTemplateAsync(path) + Vue.component('customer-stall', { + name: 'customer-stall', + template, + + props: ['stall', 'products', 'exchange-rates'], + data: function () { + return {} + }, + methods: {}, + created() { + console.log(this.stall) + console.log(this.products) + } + }) +} diff --git a/templates/nostrmarket/market.html b/templates/nostrmarket/market.html index dba048d..dc835cb 100644 --- a/templates/nostrmarket/market.html +++ b/templates/nostrmarket/market.html @@ -137,12 +137,50 @@ + - + @@ -151,6 +189,7 @@ +