feat: add basic stall list

This commit is contained in:
Vlad Stan 2023-07-14 14:28:26 +03:00
parent e37d385a2c
commit ad0ac073ab
4 changed files with 94 additions and 6 deletions

View file

@ -235,8 +235,11 @@
</q-banner>
<div>
<q-breadcrumbs class="cursor">
<q-breadcrumbs-el :label="'Market'" icon="home" @click="navigateTo('market')"
class="cursor-pointer"></q-breadcrumbs-el>
<q-breadcrumbs-el :label="'Market'" icon="home" @click="navigateTo('market')" class="cursor-pointer">
<q-checkbox v-model="groupByStall" v-if="activePage === 'market'" class="q-pl-md float-right" size="xs"
val="xs" label="Group by stalls"></q-checkbox>
</q-breadcrumbs-el>
<q-breadcrumbs-el v-if="activePage === 'customer-stall'" :label="stallName"
@click="navigateTo('stall', {stall: activeStall})" icon="storefront"
class="cursor-pointer"></q-breadcrumbs-el>
@ -285,9 +288,14 @@
:relays="relays" :account="account" :pool="pool" :styles="config?.opts ?? {}"
@login-dialog="openAccountDialog" @change-page="navigateTo" @add-to-cart="addProductToCart"></customer-stall>
<customer-market v-else :search-nostr="searchNostr" :relays="relays" :filtered-products="filterProducts"
:search-text="searchText" :filter-categories="filterCategories" :styles="config?.opts ?? {}"
@change-page="navigateTo" @update-data="updateData" @add-to-cart="addProductToCart"></customer-market>
<div v-else>
<customer-stall-list v-if="groupByStall" :stalls="stalls"></customer-stall-list>
<customer-market v-else :search-nostr="searchNostr" :relays="relays" :filtered-products="filterProducts"
:search-text="searchText" :filter-categories="filterCategories" :styles="config?.opts ?? {}"
@change-page="navigateTo" @update-data="updateData" @add-to-cart="addProductToCart"></customer-market>
</div>
</div>
<div class="col-lg-2 col-md-1 col-sm-0 auto-width"></div>
</div>
@ -381,6 +389,8 @@
<script src="{{ url_for('nostrmarket_static', path='components/product-card/product-card.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/customer-market/customer-market.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/customer-stall/customer-stall.js') }}"></script>
<script
src="{{ url_for('nostrmarket_static', path='components/customer-stall-list/customer-stall-list.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/product-detail/product-detail.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/shopping-cart/shopping-cart.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/shopping-cart-list/shopping-cart-list.js') }}"></script>