bell and whistles

This commit is contained in:
Riccardo Balbo 2024-07-24 13:00:59 +00:00
commit 88da075509
8 changed files with 34 additions and 108 deletions

View file

@ -79,8 +79,6 @@
try {
const response = await LNbits.api
.request('POST', '/nwcprovider/api/v1/config', this.g.user.wallets[0].adminkey, data)
this.$q.notify({
message: 'Config saved, please restart the server',
color: 'positive',

View file

@ -8,15 +8,8 @@
<div class="col-12 col-md-8 col-lg-7 q-gutter-y-md">
<q-card>
<q-card-section>
<!-- <div class="q-gutter-x-md row items-center"> -->
<!-- <div class="col"> -->
<q-select v-model="selectedWallet" filled dense emit-value :options="g.user.walletOptions"
label="Wallet *"></q-select>
<!-- </div>
<div class="col">
<q-btn unelevated color="primary" icon="add" @click="formDialog.show = true">Connect app</q-btn>
</div> -->
<!-- </div> -->
</q-card-section>
</q-card>
@ -27,8 +20,6 @@
<h5 class="text-subtitle1">Connected Apps</h5>
</div>
<q-btn @click="showConnectDialog()" aria-label="Connect" icon="add" color="primary" size="sm" round />
</div>
<q-table dense flat :data="nwcEntries" row-key="id" :columns="nwcsTable.columns"
:pagination.sync="nwcsTable.pagination">
@ -69,9 +60,9 @@
<div class="col-12 col-md-4 col-lg-5 q-gutter-y-md">
<q-card>
<q-card-section>
<h6 class="text-subtitle1 q-my-none">{{SITE_TITLE}} NWC Service provider extension</h6>
<h6 class="text-subtitle1 q-my-none">NWC Service provider</h6>
<p>
An extension that turns LNBits into a Nostr Wallet Connect service provider.
Nostr Wallet Connect (NWC) are a way for applications to connect to a remote lightning wallet.
</p>
</q-card-section>
<q-card-section class="q-pa-none">
@ -89,30 +80,13 @@
<q-icon name="settings" class="q-mr-md"></q-icon>
<q-item-section>Settings</q-item-section>
</q-item>
<!-- <q-expansion-item v-if="this.g.user.admin" group="extras" icon="admin" label="Admin">
<q-card>
<q-card-section>
<p>
Manage wallets using NWC
</p>
<small>Created by
<a class="text-secondary" href="https://github.com/riccardobl" target="_blank">Riccardo Balbo</a>.</small>
<small>Repo
<a class="text-secondary" href="https://github.com/riccardobl/nwcprovider" target="_blank">NWC Service
Providers</a>.</small>
</q-card-section>
</q-card>
</q-expansion-item> -->
</q-list>
</q-card-section>
</q-card>
</div>
<!--/////////////////////////////////////////////////-->
<!--//////////////FORM DIALOG////////////////////////-->
<!--/////////////////////////////////////////////////-->
<q-dialog v-model="connectionInfoDialog.show" @hide="closeConnectionInfoDialog">
<q-card class="q-pa-lg q-pt-xl" style="width: 500px">
<q-card-section class="q-ma-none">
@ -152,8 +126,6 @@
<q-th>
Budget (sats)
<div style="font-size: smaller;">used/max</div>
</q-th>
<q-th>Refresh</q-th>
</q-tr>
@ -168,14 +140,10 @@
</q-tr>
</tbody>
</q-markup-table>
</q-item-section>
</q-item>
</q-list>
<q-card-actions class="q-mt-md">
<q-btn v-close-popup flat color="grey" class="q-ml-auto full-width " @click="closePairingDialog">Close</q-btn>
</q-card-actions>
@ -186,7 +154,6 @@
<q-dialog v-model="pairingQrDialog.show" @hide="closePairingQrDialog">
<q-card class="q-pa-lg q-pt-xl" style="width: 500px">
<q-card-section class="q-ma-none">
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
<lnbits-qrcode :value="pairingQrDialog.data.pairingUrl"></lnbits-qrcode>
@ -195,21 +162,15 @@
<q-card-section class="q-ma-none">
<p class=" q-ma-none text-center">Please scan this QR code with a supported app</p>
<p class=" q-ma-none text-center text-caption ">Connect only with app you trust!</p>
</q-card-section>
<q-card-actions>
<q-btn label="Close" flat color="grey" class="full-width
" @click="closePairingQrDialog"></q-btn>
<q-btn label="Close" flat color="grey" class="full-width" @click="closePairingQrDialog"></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog v-model="pairingDialog.show" @hide="closePairingDialog">
<q-card class="q-pa-lg q-pt-xl" style="width: 500px">
<q-card-section class="q-ma-none">
<h3 class="q-ma-none q-mb-md text-center">Pairing</h3>
<p class=" q-ma-none text-center">Complete the last step of the setup by pasting or scanning your connection's
@ -217,7 +178,6 @@
app to
finalise the connection.</p>
<p class=" q-ma-none text-center text-caption ">Connect only with app you trust!</p>
</q-card-section>
<q-card-actions>
<q-btn label="Open in Supported App" color="primary" class="full-width" icon="launch"