style: fix prettier formatting
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
71f458b9b9
commit
bd010ece6b
7 changed files with 137 additions and 35 deletions
|
|
@ -20,7 +20,12 @@ window.app.component('product-list', {
|
||||||
{name: 'name', align: 'left', label: 'Name', field: 'name'},
|
{name: 'name', align: 'left', label: 'Name', field: 'name'},
|
||||||
{name: 'stall', align: 'left', label: 'Stall', field: 'stall_id'},
|
{name: 'stall', align: 'left', label: 'Stall', field: 'stall_id'},
|
||||||
{name: 'price', align: 'left', label: 'Price', field: 'price'},
|
{name: 'price', align: 'left', label: 'Price', field: 'price'},
|
||||||
{name: 'quantity', align: 'left', label: 'Quantity', field: 'quantity'},
|
{
|
||||||
|
name: 'quantity',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Quantity',
|
||||||
|
field: 'quantity'
|
||||||
|
},
|
||||||
{name: 'actions', align: 'right', label: 'Actions', field: ''}
|
{name: 'actions', align: 'right', label: 'Actions', field: ''}
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,24 @@ window.app.component('stall-list', {
|
||||||
stallsTable: {
|
stallsTable: {
|
||||||
columns: [
|
columns: [
|
||||||
{name: 'name', align: 'left', label: 'Name', field: 'name'},
|
{name: 'name', align: 'left', label: 'Name', field: 'name'},
|
||||||
{name: 'currency', align: 'left', label: 'Currency', field: 'currency'},
|
{
|
||||||
{name: 'description', align: 'left', label: 'Description', field: row => row.config?.description || ''},
|
name: 'currency',
|
||||||
{name: 'shippingZones', align: 'left', label: 'Shipping Zones', field: row => row.shipping_zones?.map(z => z.name).join(', ') || ''},
|
align: 'left',
|
||||||
|
label: 'Currency',
|
||||||
|
field: 'currency'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'description',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Description',
|
||||||
|
field: row => row.config?.description || ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'shippingZones',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Shipping Zones',
|
||||||
|
field: row => row.shipping_zones?.map(z => z.name).join(', ') || ''
|
||||||
|
},
|
||||||
{name: 'actions', align: 'right', label: 'Actions', field: ''}
|
{name: 'actions', align: 'right', label: 'Actions', field: ''}
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,9 @@ window.app = Vue.createApp({
|
||||||
},
|
},
|
||||||
refreshNip15: async function () {
|
refreshNip15: async function () {
|
||||||
LNbits.utils
|
LNbits.utils
|
||||||
.confirmDialog('This will sync your stalls and products from Nostr relays. Continue?')
|
.confirmDialog(
|
||||||
|
'This will sync your stalls and products from Nostr relays. Continue?'
|
||||||
|
)
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
try {
|
try {
|
||||||
await LNbits.api.request(
|
await LNbits.api.request(
|
||||||
|
|
|
||||||
|
|
@ -76,15 +76,23 @@
|
||||||
<q-expansion-item group="api" dense icon="info" label="About">
|
<q-expansion-item group="api" dense icon="info" label="About">
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
A decentralized marketplace powered by Nostr and Lightning Network.
|
A decentralized marketplace powered by Nostr and Lightning
|
||||||
Create stalls, add products, and start selling with Bitcoin.
|
Network. Create stalls, add products, and start selling with
|
||||||
|
Bitcoin.
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
<q-expansion-item group="api" dense icon="link" label="Market Client">
|
<q-expansion-item
|
||||||
|
group="api"
|
||||||
|
dense
|
||||||
|
icon="link"
|
||||||
|
label="Market Client"
|
||||||
|
>
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<a :href="marketClientUrl" target="_blank">Open Market Client</a>
|
<a :href="marketClientUrl" target="_blank"
|
||||||
|
>Open Market Client</a
|
||||||
|
>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
|
|
|
||||||
|
|
@ -109,8 +109,12 @@
|
||||||
color="green"
|
color="green"
|
||||||
unchecked-icon="clear"
|
unchecked-icon="clear"
|
||||||
>
|
>
|
||||||
<q-tooltip v-if="props.row.active">Product is active - click to deactivate</q-tooltip>
|
<q-tooltip v-if="props.row.active"
|
||||||
<q-tooltip v-else>Product is inactive - click to activate</q-tooltip>
|
>Product is active - click to deactivate</q-tooltip
|
||||||
|
>
|
||||||
|
<q-tooltip v-else
|
||||||
|
>Product is inactive - click to activate</q-tooltip
|
||||||
|
>
|
||||||
</q-toggle>
|
</q-toggle>
|
||||||
<q-btn
|
<q-btn
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|
@ -188,7 +192,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-expansion-item group="advanced" label="Categories" caption="Add tags to products">
|
<q-expansion-item
|
||||||
|
group="advanced"
|
||||||
|
label="Categories"
|
||||||
|
caption="Add tags to products"
|
||||||
|
>
|
||||||
<div class="q-pl-sm q-pt-sm">
|
<div class="q-pl-sm q-pt-sm">
|
||||||
<q-select
|
<q-select
|
||||||
filled
|
filled
|
||||||
|
|
@ -206,7 +214,11 @@
|
||||||
</div>
|
</div>
|
||||||
</q-expansion-item>
|
</q-expansion-item>
|
||||||
|
|
||||||
<q-expansion-item group="advanced" label="Images" caption="Add images for product">
|
<q-expansion-item
|
||||||
|
group="advanced"
|
||||||
|
label="Images"
|
||||||
|
caption="Add images for product"
|
||||||
|
>
|
||||||
<div class="q-pl-sm q-pt-sm">
|
<div class="q-pl-sm q-pt-sm">
|
||||||
<q-input
|
<q-input
|
||||||
filled
|
filled
|
||||||
|
|
@ -247,8 +259,11 @@
|
||||||
color="primary"
|
color="primary"
|
||||||
:disable="!productDialog.data.stall_id || !productDialog.data.price || !productDialog.data.name || !productDialog.data.quantity"
|
:disable="!productDialog.data.stall_id || !productDialog.data.price || !productDialog.data.name || !productDialog.data.quantity"
|
||||||
type="submit"
|
type="submit"
|
||||||
>Create Product</q-btn>
|
>Create Product</q-btn
|
||||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Cancel</q-btn>
|
>
|
||||||
|
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
|
||||||
|
>Cancel</q-btn
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
@ -266,8 +281,12 @@
|
||||||
v-ripple
|
v-ripple
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label><span v-text="pendingProduct.name"></span></q-item-label>
|
<q-item-label
|
||||||
<q-item-label caption><span v-text="pendingProduct.config?.description"></span></q-item-label>
|
><span v-text="pendingProduct.name"></span
|
||||||
|
></q-item-label>
|
||||||
|
<q-item-label caption
|
||||||
|
><span v-text="pendingProduct.config?.description"></span
|
||||||
|
></q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section class="q-pl-xl float-right">
|
<q-item-section class="q-pl-xl float-right">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -276,7 +295,8 @@
|
||||||
flat
|
flat
|
||||||
color="green"
|
color="green"
|
||||||
class="q-ml-auto float-right"
|
class="q-ml-auto float-right"
|
||||||
>Restore</q-btn>
|
>Restore</q-btn
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,9 @@
|
||||||
<span v-text="shortLabel(props.row.config.description)"></span>
|
<span v-text="shortLabel(props.row.config.description)"></span>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="shippingZones" :props="props">
|
<q-td key="shippingZones" :props="props">
|
||||||
<span v-text="shortLabel(props.row.shipping_zones.filter(z => !!z.name).map(z => z.name).join(', '))"></span>
|
<span
|
||||||
|
v-text="shortLabel(props.row.shipping_zones.filter(z => !!z.name).map(z => z.name).join(', '))"
|
||||||
|
></span>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="actions" :props="props">
|
<q-td key="actions" :props="props">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,42 @@
|
||||||
indicator-color="primary"
|
indicator-color="primary"
|
||||||
align="left"
|
align="left"
|
||||||
>
|
>
|
||||||
<q-tab name="merchant" label="Merchant" icon="person" style="min-width: 120px"></q-tab>
|
<q-tab
|
||||||
<q-tab name="shipping" label="Shipping" icon="local_shipping" style="min-width: 120px"></q-tab>
|
name="merchant"
|
||||||
<q-tab name="stalls" label="Stalls" icon="store" style="min-width: 120px"></q-tab>
|
label="Merchant"
|
||||||
<q-tab name="products" label="Products" icon="inventory_2" style="min-width: 120px"></q-tab>
|
icon="person"
|
||||||
<q-tab name="messages" label="Messages" icon="chat" style="min-width: 120px"></q-tab>
|
style="min-width: 120px"
|
||||||
<q-tab name="orders" label="Orders" icon="receipt" style="min-width: 120px"></q-tab>
|
></q-tab>
|
||||||
|
<q-tab
|
||||||
|
name="shipping"
|
||||||
|
label="Shipping"
|
||||||
|
icon="local_shipping"
|
||||||
|
style="min-width: 120px"
|
||||||
|
></q-tab>
|
||||||
|
<q-tab
|
||||||
|
name="stalls"
|
||||||
|
label="Stalls"
|
||||||
|
icon="store"
|
||||||
|
style="min-width: 120px"
|
||||||
|
></q-tab>
|
||||||
|
<q-tab
|
||||||
|
name="products"
|
||||||
|
label="Products"
|
||||||
|
icon="inventory_2"
|
||||||
|
style="min-width: 120px"
|
||||||
|
></q-tab>
|
||||||
|
<q-tab
|
||||||
|
name="messages"
|
||||||
|
label="Messages"
|
||||||
|
icon="chat"
|
||||||
|
style="min-width: 120px"
|
||||||
|
></q-tab>
|
||||||
|
<q-tab
|
||||||
|
name="orders"
|
||||||
|
label="Orders"
|
||||||
|
icon="receipt"
|
||||||
|
style="min-width: 120px"
|
||||||
|
></q-tab>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<div class="col-auto q-mr-md">
|
<div class="col-auto q-mr-md">
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
|
|
@ -33,7 +63,9 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>Publish NIP-15</q-item-label>
|
<q-item-label>Publish NIP-15</q-item-label>
|
||||||
<q-item-label caption>Publish stalls and products</q-item-label>
|
<q-item-label caption
|
||||||
|
>Publish stalls and products</q-item-label
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item disable>
|
<q-item disable>
|
||||||
|
|
@ -41,8 +73,12 @@
|
||||||
<q-icon name="sell" color="grey" />
|
<q-icon name="sell" color="grey" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey">Publish NIP-99</q-item-label>
|
<q-item-label class="text-grey"
|
||||||
<q-item-label caption>Classified listings (coming soon)</q-item-label>
|
>Publish NIP-99</q-item-label
|
||||||
|
>
|
||||||
|
<q-item-label caption
|
||||||
|
>Classified listings (coming soon)</q-item-label
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -52,7 +88,9 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>Refresh NIP-15 from Nostr</q-item-label>
|
<q-item-label>Refresh NIP-15 from Nostr</q-item-label>
|
||||||
<q-item-label caption>Sync stalls and products</q-item-label>
|
<q-item-label caption
|
||||||
|
>Sync stalls and products</q-item-label
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item disable>
|
<q-item disable>
|
||||||
|
|
@ -60,8 +98,12 @@
|
||||||
<q-icon name="refresh" color="grey" />
|
<q-icon name="refresh" color="grey" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey">Refresh NIP-99 from Nostr</q-item-label>
|
<q-item-label class="text-grey"
|
||||||
<q-item-label caption>Classified listings (coming soon)</q-item-label>
|
>Refresh NIP-99 from Nostr</q-item-label
|
||||||
|
>
|
||||||
|
<q-item-label caption
|
||||||
|
>Classified listings (coming soon)</q-item-label
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
@ -70,8 +112,12 @@
|
||||||
<q-icon name="delete_forever" color="negative" />
|
<q-icon name="delete_forever" color="negative" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-negative">Delete NIP-15 from Nostr</q-item-label>
|
<q-item-label class="text-negative"
|
||||||
<q-item-label caption>Remove stalls and products</q-item-label>
|
>Delete NIP-15 from Nostr</q-item-label
|
||||||
|
>
|
||||||
|
<q-item-label caption
|
||||||
|
>Remove stalls and products</q-item-label
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item disable>
|
<q-item disable>
|
||||||
|
|
@ -79,8 +125,12 @@
|
||||||
<q-icon name="delete_forever" color="grey" />
|
<q-icon name="delete_forever" color="grey" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label class="text-grey">Delete NIP-99 from Nostr</q-item-label>
|
<q-item-label class="text-grey"
|
||||||
<q-item-label caption>Classified listings (coming soon)</q-item-label>
|
>Delete NIP-99 from Nostr</q-item-label
|
||||||
|
>
|
||||||
|
<q-item-label caption
|
||||||
|
>Classified listings (coming soon)</q-item-label
|
||||||
|
>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue