feat: add merchant-details

This commit is contained in:
Vlad Stan 2023-03-14 11:19:53 +02:00
parent 6c5299fe05
commit 152fe5baab
3 changed files with 15 additions and 10 deletions

View file

@ -4,6 +4,7 @@
unelevated unelevated
color="primary" color="primary"
icon="public" icon="public"
label="Zones"
@click="openZoneDialog()" @click="openZoneDialog()"
> >
<q-list> <q-list>

View file

@ -7,6 +7,9 @@ const merchant = async () => {
await stallList('static/components/stall-list/stall-list.html') await stallList('static/components/stall-list/stall-list.html')
await orderList('static/components/order-list/order-list.html') await orderList('static/components/order-list/order-list.html')
await directMessages('static/components/direct-messages/direct-messages.html') await directMessages('static/components/direct-messages/direct-messages.html')
await merchantDetails(
'static/components/merchant-details/merchant-details.html'
)
const nostr = window.NostrTools const nostr = window.NostrTools
@ -52,6 +55,9 @@ const merchant = async () => {
showImportKeysDialog: async function () { showImportKeysDialog: async function () {
this.importKeyDialog.show = true this.importKeyDialog.show = true
}, },
toggleMerchantKeys: function (value) {
this.showKeys = value
},
createMerchant: async function (privateKey) { createMerchant: async function (privateKey) {
try { try {
const pubkey = nostr.getPublicKey(privateKey) const pubkey = nostr.getPublicKey(privateKey)

View file

@ -61,6 +61,13 @@
<q-card> <q-card>
<q-card-section> <q-card-section>
<div class="row"> <div class="row">
<div class="col-2">
<merchant-details
:inkey="g.user.wallets[0].inkey"
:adminkey="g.user.wallets[0].adminkey"
@show-keys="toggleMerchantKeys"
></merchant-details>
</div>
<div class="col-8"></div> <div class="col-8"></div>
<div class="col-2"> <div class="col-2">
<shipping-zones <shipping-zones
@ -69,16 +76,6 @@
class="float-right" class="float-right"
></shipping-zones> ></shipping-zones>
</div> </div>
<div class="col-2">
<q-btn
@click="showKeys = !showKeys"
icon="vpn_key"
color="primary"
class="float-right"
>
<q-tooltip> Show Public and Private keys </q-tooltip>
</q-btn>
</div>
</div> </div>
</q-card-section> </q-card-section>
<q-card-section v-if="showKeys"> <q-card-section v-if="showKeys">
@ -179,6 +176,7 @@
<script src="{{ url_for('nostrmarket_static', path='components/stall-list/stall-list.js') }}"></script> <script src="{{ url_for('nostrmarket_static', path='components/stall-list/stall-list.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/order-list/order-list.js') }}"></script> <script src="{{ url_for('nostrmarket_static', path='components/order-list/order-list.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/direct-messages/direct-messages.js') }}"></script> <script src="{{ url_for('nostrmarket_static', path='components/direct-messages/direct-messages.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='components/merchant-details/merchant-details.js') }}"></script>
<script src="{{ url_for('nostrmarket_static', path='js/index.js') }}"></script> <script src="{{ url_for('nostrmarket_static', path='js/index.js') }}"></script>
{% endblock %} {% endblock %}