From dc1650d036920b52bed8c9764a6ac7237d97dfc7 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Fri, 3 Mar 2023 10:24:42 +0000 Subject: [PATCH] mergeable-ish client UI --- .../customer-market/customer-market.html | 12 +- .../customer-stall/customer-stall.html | 1 + .../customer-stall/customer-stall.js | 21 +- .../product-detail/product-detail.html | 188 +++++++++++++++++- .../product-detail/product-detail.js | 17 +- templates/nostrmarket/market.html | 108 +++++----- 6 files changed, 283 insertions(+), 64 deletions(-) diff --git a/static/components/customer-market/customer-market.html b/static/components/customer-market/customer-market.html index b52c6c2..97a00b9 100644 --- a/static/components/customer-market/customer-market.html +++ b/static/components/customer-market/customer-market.html @@ -70,13 +70,21 @@ Stall: {{ item.stallName }}
- See product + View details + + Visit Stall diff --git a/static/components/customer-stall/customer-stall.html b/static/components/customer-stall/customer-stall.html index c99290e..306a5f7 100644 --- a/static/components/customer-stall/customer-stall.html +++ b/static/components/customer-stall/customer-stall.html @@ -12,6 +12,7 @@ +
+
+
+
+ + + +
+
+
+
+
+
{{ product.name }}
+
+ {{cat}} +
+
{{ product.description }}
+
+ + {{ product.price }} satsBTC {{ (product.price / 1e8).toFixed(8) }} + + + {{ product.formatedPrice }} + ({{ product.priceInSats }} sats) + + {{ product.amount > 0 ? 'In stock.' : 'Out of stock.' }} + +
+
+ + +
+
+ +
+
Customer rating
+
4.2
+
+ +
+
(357 reviews)
+
+ 93% would recommend to a friend +
+ + + + 5 + + + 273 + + + 4 + + +   69 + + + 3 + + +      6 + + + 2 + + +      3 + + + 1 + + +      6 + + +
+
+
+
+ +
+
diff --git a/static/components/product-detail/product-detail.js b/static/components/product-detail/product-detail.js index 27a8d72..7b60f6b 100644 --- a/static/components/product-detail/product-detail.js +++ b/static/components/product-detail/product-detail.js @@ -6,8 +6,21 @@ async function productDetail(path) { props: ['product'], data: function () { - return {} + return { + slide: 1 + } }, - methods: {} + computed: { + win_width() { + return this.$q.screen.width - 59 + }, + win_height() { + return this.$q.screen.height - 0 + } + }, + methods: {}, + created() { + console.log('ping') + } }) } diff --git a/templates/nostrmarket/market.html b/templates/nostrmarket/market.html index dc835cb..8469175 100644 --- a/templates/nostrmarket/market.html +++ b/templates/nostrmarket/market.html @@ -137,35 +137,6 @@ -
@@ -174,6 +145,7 @@ :stall="stalls.find(stall => stall.id == activeStall)" :products="filterProducts" :exchange-rates="exchangeRates" + :product-detail="activeProduct" @change-page="navigateTo" > +