Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a9e638c1e | ||
|
|
59a2fefbf3 | ||
|
|
4725eb95c9 | ||
|
|
a5aaced420 | ||
|
|
87a6514b62 | ||
|
|
32c893027d | ||
|
|
751598e0f8 | ||
|
|
e11ccd9757 | ||
|
|
7e344de10e | ||
|
|
08fdeedffc | ||
|
|
73ba9d94a5 | ||
|
|
1640e23f75 | ||
|
|
9145c13435 | ||
|
|
41048b8cc7 | ||
|
|
b46e2c549d | ||
|
|
b382ccfdf3 | ||
|
|
1687972d89 | ||
|
|
d621a6f81f | ||
|
|
b9d00d900e | ||
|
|
0f06b7ba52 | ||
|
|
220ece6027 | ||
|
|
1663845468 | ||
|
|
5b7d1e63b5 | ||
|
|
5bd8bf2f56 |
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,105 @@
|
||||
window.app.component('lnbits-dialog', {
|
||||
template: '#lnbits-dialog',
|
||||
|
||||
props: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
position: {
|
||||
type: String,
|
||||
default: 'top'
|
||||
},
|
||||
persistent: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showCancel: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
cancelLabel: {
|
||||
type: String,
|
||||
default: 'Close'
|
||||
},
|
||||
cancelColor: {
|
||||
type: String,
|
||||
default: 'grey'
|
||||
},
|
||||
action: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
secondaryAction: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
|
||||
emits: ['update:show', 'hide', 'cancel', 'action', 'secondary-action'],
|
||||
|
||||
computed: {
|
||||
hasAction() {
|
||||
return !!(this.action && this.action.label)
|
||||
},
|
||||
hasSecondaryAction() {
|
||||
return !!(this.secondaryAction && this.secondaryAction.label)
|
||||
},
|
||||
|
||||
actionProps() {
|
||||
const action = this.action || {}
|
||||
const obj = {
|
||||
label: action.label || 'Action',
|
||||
color: action.color || 'primary',
|
||||
loading: !!action.loading,
|
||||
disable: !!action.disable,
|
||||
closePopup: !!action.closePopup
|
||||
}
|
||||
if (action.icon) {
|
||||
obj.icon = action.icon
|
||||
}
|
||||
return obj
|
||||
},
|
||||
secondaryActionProps() {
|
||||
const action = this.secondaryAction || {}
|
||||
const obj = {
|
||||
label: action.label || 'Secondary',
|
||||
color: action.color || 'secondary',
|
||||
loading: !!action.loading,
|
||||
disable: !!action.disable,
|
||||
closePopup: !!action.closePopup
|
||||
}
|
||||
if (action.icon) {
|
||||
obj.icon = action.icon
|
||||
}
|
||||
return obj
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleModelUpdate(value) {
|
||||
this.$emit('update:show', value)
|
||||
},
|
||||
|
||||
handleHide() {
|
||||
this.handleModelUpdate(false)
|
||||
this.$emit('hide')
|
||||
},
|
||||
|
||||
handleCancel() {
|
||||
this.$emit('cancel')
|
||||
},
|
||||
|
||||
handleAction() {
|
||||
this.$emit('action')
|
||||
},
|
||||
|
||||
handleSecondaryAction() {
|
||||
this.$emit('secondary-action')
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -70,6 +70,7 @@
|
||||
"js/components/admin/lnbits-admin-site-customisation.js",
|
||||
"js/components/admin/lnbits-admin-assets-config.js",
|
||||
"js/components/admin/lnbits-admin-audit.js",
|
||||
"js/components/lnbits-dialog.js",
|
||||
"js/components/lnbits-wallet-charts.js",
|
||||
"js/components/lnbits-wallet-api-docs.js",
|
||||
"js/components/lnbits-wallet-icon.js",
|
||||
|
||||
@@ -30,7 +30,8 @@ include('components/lnbits-wallet-share.vue') %} {%
|
||||
include('components/lnbits-wallet-charts.vue') %} {%
|
||||
include('components/lnbits-wallet-paylinks.vue') %} {%
|
||||
include('components/lnbits-wallet-extra.vue') %} {%
|
||||
include('components/lnbits-error.vue') %}
|
||||
include('components/lnbits-error.vue') %} {%
|
||||
include('components/lnbits-dialog.vue') %}
|
||||
|
||||
<template id="lnbits-manage">
|
||||
<q-list v-if="g.user" dense class="lnbits-drawer__q-list">
|
||||
|
||||
@@ -199,47 +199,36 @@
|
||||
</div>
|
||||
<div class="col-md-8 col-sm-12"></div>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="exchangeData.showTickerConversion" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<div class="q-mb-md">
|
||||
<strong v-text="$t('create_ticker_converter')"></strong>
|
||||
<lnbits-dialog
|
||||
:show="exchangeData.showTickerConversion"
|
||||
:title="$t('create_ticker_converter')"
|
||||
:action="{
|
||||
label: 'Add Ticker Conversion'
|
||||
}"
|
||||
:cancel-label="$t('close')"
|
||||
@update:show="exchangeData.showTickerConversion = $event"
|
||||
@action="addExchangeTickerConversion()"
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-12 q-mb-md">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
v-model="exchangeData.convertFromTicker"
|
||||
label="From Currency"
|
||||
:options="currencies"
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 q-mb-md">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
v-model="exchangeData.convertFromTicker"
|
||||
label="From Currency"
|
||||
:options="currencies"
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="exchangeData.convertToTicker"
|
||||
dense
|
||||
filled
|
||||
label="New Ticker"
|
||||
hint="This ticker will be used for the exchange API calls."
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="exchangeData.convertToTicker"
|
||||
dense
|
||||
filled
|
||||
label="New Ticker"
|
||||
hint="This ticker will be used for the exchange API calls."
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
@click="addExchangeTickerConversion()"
|
||||
label="Add Ticker Conversion"
|
||||
color="primary"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('close')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
@@ -125,15 +125,14 @@
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-list>
|
||||
<q-dialog v-model="showQRDialog">
|
||||
<q-card class="q-pa-md">
|
||||
<q-card-section>
|
||||
<lnbits-qrcode :value="qrValue"></lnbits-qrcode>
|
||||
</q-card-section>
|
||||
<q-card-actions align="right">
|
||||
<q-btn flat :label="$t('close')" v-close-popup />
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<lnbits-dialog
|
||||
:show="showQRDialog"
|
||||
:position="'standard'"
|
||||
@update:show="showQRDialog = $event"
|
||||
>
|
||||
<q-card-section>
|
||||
<lnbits-qrcode :value="qrValue"></lnbits-qrcode>
|
||||
</q-card-section>
|
||||
</lnbits-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<template id="lnbits-dialog">
|
||||
<q-dialog
|
||||
:model-value="show"
|
||||
:position="position"
|
||||
:persistent="persistent"
|
||||
@update:model-value="handleModelUpdate"
|
||||
@hide="handleHide"
|
||||
>
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<!-- Header with optional title -->
|
||||
<q-card-section v-if="title">
|
||||
<div class="text-h6" v-text="title"></div>
|
||||
</q-card-section>
|
||||
|
||||
<!-- Main content slot -->
|
||||
<q-card-section>
|
||||
<slot></slot>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions
|
||||
v-if="showCancel || hasAction || hasSecondaryAction"
|
||||
class="q-mt-lg"
|
||||
align="right"
|
||||
>
|
||||
<q-btn
|
||||
v-if="showCancel"
|
||||
v-close-popup
|
||||
flat
|
||||
:color="cancelColor"
|
||||
:label="cancelLabel"
|
||||
@click="handleCancel"
|
||||
></q-btn>
|
||||
|
||||
<q-space></q-space>
|
||||
|
||||
<q-btn
|
||||
v-if="hasSecondaryAction"
|
||||
:icon="secondaryActionProps.icon"
|
||||
:color="secondaryActionProps.color"
|
||||
:label="secondaryActionProps.label"
|
||||
:loading="secondaryActionProps.loading"
|
||||
:disable="secondaryActionProps.disable"
|
||||
@click="handleSecondaryAction"
|
||||
v-close-popup="secondaryActionProps.closePopup"
|
||||
class="q-mr-sm"
|
||||
></q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="hasAction"
|
||||
:icon="actionProps.icon"
|
||||
:color="actionProps.color"
|
||||
:label="actionProps.label"
|
||||
:loading="actionProps.loading"
|
||||
:disable="actionProps.disable"
|
||||
@click="handleAction"
|
||||
v-close-popup="actionProps.closePopup"
|
||||
></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
@@ -394,159 +394,135 @@
|
||||
></span>
|
||||
</i>
|
||||
</q-td>
|
||||
<q-dialog v-model="props.expand" :props="props" position="top">
|
||||
<q-card class="q-pa-sm q-pt-xl lnbits__dialog-card">
|
||||
<q-card-section>
|
||||
<q-list bordered separator>
|
||||
<q-expansion-item
|
||||
expand-separator
|
||||
:default-opened="!(props.row.isIn && props.row.isPending)"
|
||||
>
|
||||
<template v-slot:header>
|
||||
<q-item-section avatar>
|
||||
<q-icon
|
||||
:color="
|
||||
props.row.isPaid && props.row.isIn
|
||||
? 'green'
|
||||
: props.row.isPaid && props.row.isOut
|
||||
? 'pink'
|
||||
: props.row.isFailed
|
||||
? 'yellow'
|
||||
: 'grey'
|
||||
"
|
||||
:name="
|
||||
props.row.isPaid && props.row.isIn
|
||||
? 'call_received'
|
||||
: props.row.isPaid && props.row.isOut
|
||||
? 'call_made'
|
||||
: props.row.isFailed
|
||||
? 'warning'
|
||||
: 'settings_ethernet'
|
||||
"
|
||||
/>
|
||||
</q-item-section>
|
||||
<lnbits-dialog
|
||||
:show="props.expand"
|
||||
:cancel-label="$t('close')"
|
||||
:action="{
|
||||
label: $t('check_payment'),
|
||||
icon: 'refresh'
|
||||
}"
|
||||
@update:show="props.expand = $event"
|
||||
@action="checkPayment(props.row.payment_hash)"
|
||||
>
|
||||
<q-list bordered separator>
|
||||
<q-expansion-item
|
||||
expand-separator
|
||||
:default-opened="!(props.row.isIn && props.row.isPending)"
|
||||
>
|
||||
<template v-slot:header>
|
||||
<q-item-section avatar>
|
||||
<q-icon
|
||||
:color="
|
||||
props.row.isPaid && props.row.isIn
|
||||
? 'green'
|
||||
: props.row.isPaid && props.row.isOut
|
||||
? 'pink'
|
||||
: props.row.isFailed
|
||||
? 'yellow'
|
||||
: 'grey'
|
||||
"
|
||||
:name="
|
||||
props.row.isPaid && props.row.isIn
|
||||
? 'call_received'
|
||||
: props.row.isPaid && props.row.isOut
|
||||
? 'call_made'
|
||||
: props.row.isFailed
|
||||
? 'warning'
|
||||
: 'settings_ethernet'
|
||||
"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
v-text="
|
||||
props.row.isIn && props.row.isPending
|
||||
? $t('invoice_waiting')
|
||||
: props.row.isOut && props.row.isPending
|
||||
? $t('outgoing_payment_pending')
|
||||
: props.row.isPaid && props.row.isIn
|
||||
? $t('payment_received')
|
||||
: props.row.isPaid && props.row.isOut
|
||||
? $t('payment_sent')
|
||||
: props.row.isFailed
|
||||
? $t('payment_failed')
|
||||
: ''
|
||||
"
|
||||
></q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section v-if="props.row.tag" side>
|
||||
<q-badge
|
||||
v-if="props.row.extra && !!props.row.extra.tag"
|
||||
color="yellow"
|
||||
text-color="black"
|
||||
>
|
||||
#<span v-text="props.row.tag"></span>
|
||||
</q-badge>
|
||||
</q-item-section>
|
||||
</template>
|
||||
<q-separator></q-separator>
|
||||
<lnbits-payment-details
|
||||
:payment="props.row"
|
||||
></lnbits-payment-details>
|
||||
</q-expansion-item>
|
||||
</q-list>
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
v-text="
|
||||
props.row.isIn && props.row.isPending
|
||||
? $t('invoice_waiting')
|
||||
: props.row.isOut && props.row.isPending
|
||||
? $t('outgoing_payment_pending')
|
||||
: props.row.isPaid && props.row.isIn
|
||||
? $t('payment_received')
|
||||
: props.row.isPaid && props.row.isOut
|
||||
? $t('payment_sent')
|
||||
: props.row.isFailed
|
||||
? $t('payment_failed')
|
||||
: ''
|
||||
"
|
||||
></q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section v-if="props.row.tag" side>
|
||||
<q-badge
|
||||
v-if="props.row.extra && !!props.row.extra.tag"
|
||||
color="yellow"
|
||||
text-color="black"
|
||||
>
|
||||
#<span v-text="props.row.tag"></span>
|
||||
</q-badge>
|
||||
</q-item-section>
|
||||
</template>
|
||||
<q-separator></q-separator>
|
||||
<lnbits-payment-details
|
||||
:payment="props.row"
|
||||
></lnbits-payment-details>
|
||||
</q-expansion-item>
|
||||
</q-list>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
props.row.isIn && props.row.isPending && props.row.bolt11
|
||||
"
|
||||
>
|
||||
<div v-if="props.row.extra.fiat_payment_request">
|
||||
<lnbits-qrcode
|
||||
:value="props.row.extra.fiat_payment_request"
|
||||
:href="props.row.extra.fiat_payment_request"
|
||||
:show-buttons="false"
|
||||
></lnbits-qrcode>
|
||||
</div>
|
||||
<div v-else>
|
||||
<lnbits-qrcode
|
||||
:value="'lightning:' + props.row.bolt11.toUpperCase()"
|
||||
:href="'lightning:' + props.row.bolt11"
|
||||
></lnbits-qrcode>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mt-md">
|
||||
<q-btn
|
||||
outline
|
||||
color="grey"
|
||||
@click="checkPayment(props.row.payment_hash)"
|
||||
icon="refresh"
|
||||
:label="$t('payment_check')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('close')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="hodlInvoice.show" position="top">
|
||||
<q-card class="q-pa-sm q-pt-xl lnbits__dialog-card">
|
||||
<q-card-section>
|
||||
<q-item-label class="text-h6">
|
||||
<span v-text="$t('hold_invoice')"></span>
|
||||
</q-item-label>
|
||||
<q-item-label class="text-subtitle2">
|
||||
<span v-text="$t('hold_invoice_description')"></span>
|
||||
</q-item-label>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<q-input
|
||||
filled
|
||||
:label="$t('preimage')"
|
||||
:hint="$t('preimage_hint')"
|
||||
v-model="hodlInvoice.preimage"
|
||||
dense
|
||||
autofocus
|
||||
@keyup.enter="settleHoldInvoice(hodlInvoice.preimage)"
|
||||
>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
<q-card-section class="row q-gutter-x-sm">
|
||||
<q-btn
|
||||
@click="settleHoldInvoice(hodlInvoice.preimage)"
|
||||
outline
|
||||
v-close-popup
|
||||
color="grey"
|
||||
:label="$t('settle_invoice')"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
outline
|
||||
color="grey"
|
||||
class="q-ml-sm"
|
||||
@click="cancelHoldInvoice(hodlInvoice.payment.payment_hash)"
|
||||
:label="$t('cancel_invoice')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('close')"
|
||||
></q-btn>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<div
|
||||
v-if="props.row.isIn && props.row.isPending && props.row.bolt11"
|
||||
>
|
||||
<div v-if="props.row.extra.fiat_payment_request">
|
||||
<lnbits-qrcode
|
||||
:value="props.row.extra.fiat_payment_request"
|
||||
:href="props.row.extra.fiat_payment_request"
|
||||
:show-buttons="false"
|
||||
></lnbits-qrcode>
|
||||
</div>
|
||||
<div v-else>
|
||||
<lnbits-qrcode
|
||||
:value="'lightning:' + props.row.bolt11.toUpperCase()"
|
||||
:href="'lightning:' + props.row.bolt11"
|
||||
></lnbits-qrcode>
|
||||
</div>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
<lnbits-dialog
|
||||
:show="hodlInvoice.show"
|
||||
:cancel-label="$t('close')"
|
||||
:action="{
|
||||
label: $t('cancel_invoice'),
|
||||
color: 'grey',
|
||||
closePopup: true
|
||||
}"
|
||||
:secondary-action="{
|
||||
label: $t('settle_invoice'),
|
||||
color: 'grey',
|
||||
closePopup: true
|
||||
}"
|
||||
@update:show="hodlInvoice.show = $event"
|
||||
@action="cancelHoldInvoice(hodlInvoice.payment.payment_hash)"
|
||||
@secondary-action="settleHoldInvoice(hodlInvoice.preimage)"
|
||||
>
|
||||
<q-card-section>
|
||||
<q-item-label class="text-h6">
|
||||
<span v-text="$t('hold_invoice')"></span>
|
||||
</q-item-label>
|
||||
<q-item-label class="text-subtitle2">
|
||||
<span v-text="$t('hold_invoice_description')"></span>
|
||||
</q-item-label>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<q-input
|
||||
filled
|
||||
:label="$t('preimage')"
|
||||
:hint="$t('preimage_hint')"
|
||||
v-model="hodlInvoice.preimage"
|
||||
dense
|
||||
autofocus
|
||||
@keyup.enter="settleHoldInvoice(hodlInvoice.preimage)"
|
||||
>
|
||||
</q-input>
|
||||
</q-card-section>
|
||||
</lnbits-dialog>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
<template id="lnbits-qrcode-scanner">
|
||||
<q-dialog v-model="showScanner" position="top">
|
||||
<q-card class="q-pa-lg q-pt-xl">
|
||||
<div class="text-center q-mb-lg">
|
||||
<qrcode-stream
|
||||
@detect="detect"
|
||||
@camera-on="onInitQR"
|
||||
class="rounded-borders"
|
||||
></qrcode-stream>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
@click="reset"
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<lnbits-dialog
|
||||
:show="showScanner"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="showScanner = $event"
|
||||
@cancel="reset"
|
||||
>
|
||||
<div class="text-center q-mb-lg">
|
||||
<qrcode-stream
|
||||
@detect="detect"
|
||||
@camera-on="onInitQR"
|
||||
class="rounded-borders"
|
||||
></qrcode-stream>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
@@ -8,49 +8,48 @@
|
||||
icon="edit"
|
||||
style="position: relative; left: -15px; bottom: -10px"
|
||||
></q-btn>
|
||||
<q-dialog v-model="icon.show" position="top">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form @submit="setIcon" class="q-gutter-md">
|
||||
<div class="q-gutter-sm q-pa-sm flex flex-wrap justify-center">
|
||||
<lnbits-dialog
|
||||
:show="icon.show"
|
||||
:action="{
|
||||
label: 'Save Icon',
|
||||
disable: !icon.data.icon
|
||||
}"
|
||||
@update:show="icon.show = $event"
|
||||
@action="setIcon"
|
||||
@hide="icon.data = {}"
|
||||
>
|
||||
<q-form class="q-gutter-md">
|
||||
<div class="q-gutter-sm q-pa-sm flex flex-wrap justify-center">
|
||||
<q-btn
|
||||
v-for="(thisIcon, index) in icon.options"
|
||||
:key="index"
|
||||
@click="setSelectedIcon(thisIcon)"
|
||||
round
|
||||
text-color="black"
|
||||
:color="
|
||||
icon.data.icon === thisIcon
|
||||
? icon.data.color || 'primary'
|
||||
: 'grey-5'
|
||||
"
|
||||
size="md"
|
||||
:icon="thisIcon"
|
||||
class="q-mb-sm"
|
||||
></q-btn>
|
||||
</div>
|
||||
<div class="q-pa-sm flex justify-between items-center">
|
||||
<div class="flex q-pl-lg">
|
||||
<q-btn
|
||||
v-for="(thisIcon, index) in icon.options"
|
||||
:key="index"
|
||||
@click="setSelectedIcon(thisIcon)"
|
||||
v-for="(color, index) in icon.colorOptions"
|
||||
:key="'color-' + index"
|
||||
@click="setSelectedColor(color)"
|
||||
round
|
||||
text-color="black"
|
||||
:color="
|
||||
icon.data.icon === thisIcon
|
||||
? icon.data.color || 'primary'
|
||||
: 'grey-5'
|
||||
"
|
||||
size="md"
|
||||
:icon="thisIcon"
|
||||
class="q-mb-sm"
|
||||
:color="color"
|
||||
size="xs"
|
||||
style="width: 24px; height: 24px; min-width: 24px; padding: 0"
|
||||
class="q-mr-xs"
|
||||
></q-btn>
|
||||
</div>
|
||||
<div class="q-pa-sm flex justify-between items-center">
|
||||
<div class="flex q-pl-lg">
|
||||
<q-btn
|
||||
v-for="(color, index) in icon.colorOptions"
|
||||
:key="'color-' + index"
|
||||
@click="setSelectedColor(color)"
|
||||
round
|
||||
:color="color"
|
||||
size="xs"
|
||||
style="width: 24px; height: 24px; min-width: 24px; padding: 0"
|
||||
class="q-mr-xs"
|
||||
></q-btn>
|
||||
</div>
|
||||
<q-btn
|
||||
unelevated
|
||||
color="primary"
|
||||
:disable="!icon.data.icon"
|
||||
type="submit"
|
||||
>
|
||||
Save Icon
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</q-form>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
@@ -1,94 +1,72 @@
|
||||
<template id="lnbits-wallet-new">
|
||||
<q-dialog v-model="showNewWalletDialog" position="top">
|
||||
<q-card class="q-pa-lg q-pt-md lnbits__dialog-card">
|
||||
<q-card-section>
|
||||
<div class="text-h6">
|
||||
<span v-text="$t('add_new_wallet')"></span>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section v-if="g.user.walletInvitesCount">
|
||||
<q-badge
|
||||
@click="g.newWalletType = 'lightning-shared'"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<span
|
||||
v-text="
|
||||
'You have ' +
|
||||
g.user.walletInvitesCount +
|
||||
' wallet invitation' +
|
||||
(g.user.walletInvitesCount > 1 ? 's' : '')
|
||||
"
|
||||
></span>
|
||||
</q-badge>
|
||||
</q-card-section>
|
||||
<lnbits-dialog
|
||||
:show="showNewWalletDialog"
|
||||
:title="$t('add_new_wallet')"
|
||||
:action="{
|
||||
label: $t('add_wallet'),
|
||||
closePopup: true
|
||||
}"
|
||||
:secondary-action="
|
||||
isLightningShared
|
||||
? {
|
||||
label: $t('reject_wallet'),
|
||||
color: 'negative',
|
||||
closePopup: true
|
||||
}
|
||||
: null
|
||||
"
|
||||
@update:show="showNewWalletDialog = $event"
|
||||
@action="submitAddWallet"
|
||||
@secondary-action="submitRejectWalletInvitation"
|
||||
>
|
||||
<q-card-section v-if="g.user.walletInvitesCount">
|
||||
<q-badge
|
||||
@click="g.newWalletType = 'lightning-shared'"
|
||||
class="cursor-pointer"
|
||||
>
|
||||
<span
|
||||
v-text="
|
||||
'You have ' +
|
||||
g.user.walletInvitesCount +
|
||||
' wallet invitation' +
|
||||
(g.user.walletInvitesCount > 1 ? 's' : '')
|
||||
"
|
||||
></span>
|
||||
</q-badge>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-section class="q-pt-none">
|
||||
<q-select
|
||||
v-if="walletTypes.length > 1"
|
||||
:options="walletTypes"
|
||||
emit-value
|
||||
map-options
|
||||
:label="$t('wallet_type')"
|
||||
v-model="g.newWalletType"
|
||||
dense
|
||||
></q-select>
|
||||
<q-input
|
||||
v-if="isLightning"
|
||||
dense
|
||||
v-model="wallet.name"
|
||||
:label="$t('wallet_name')"
|
||||
autofocus
|
||||
@keyup.enter="submitAddWallet()"
|
||||
class="q-mt-md"
|
||||
></q-input>
|
||||
<q-select
|
||||
v-if="isLightningShared"
|
||||
v-model="wallet.sharedWalletId"
|
||||
:label="$t('shared_wallet_id')"
|
||||
emit-value
|
||||
map-options
|
||||
dense
|
||||
:options="inviteWalletOptions"
|
||||
class="q-mt-md"
|
||||
></q-select>
|
||||
<div v-if="isLightningShared" class="q-mt-md">
|
||||
<span v-text="$t('shared_wallet_desc')" class="q-mt-lg"></span>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions class="text-primary">
|
||||
<div class="row full-width">
|
||||
<div class="col-md-4">
|
||||
<q-btn
|
||||
flat
|
||||
:label="$t('cancel')"
|
||||
class="float-left"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<q-btn
|
||||
v-if="isLightningShared"
|
||||
:disabled="!wallet.sharedWalletId"
|
||||
flat
|
||||
:label="$t('reject_wallet')"
|
||||
v-close-popup
|
||||
color="negative"
|
||||
@click="submitRejectWalletInvitation()"
|
||||
></q-btn>
|
||||
<span v-else></span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<q-btn
|
||||
flat
|
||||
:label="$t('add_wallet')"
|
||||
v-close-popup
|
||||
@click="submitAddWallet()"
|
||||
class="float-right"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-card-section class="q-pt-none">
|
||||
<q-select
|
||||
v-if="walletTypes.length > 1"
|
||||
:options="walletTypes"
|
||||
emit-value
|
||||
map-options
|
||||
:label="$t('wallet_type')"
|
||||
v-model="g.newWalletType"
|
||||
dense
|
||||
></q-select>
|
||||
<q-input
|
||||
v-if="isLightning"
|
||||
dense
|
||||
v-model="wallet.name"
|
||||
:label="$t('wallet_name')"
|
||||
autofocus
|
||||
@keyup.enter="submitAddWallet()"
|
||||
class="q-mt-md"
|
||||
></q-input>
|
||||
<q-select
|
||||
v-if="isLightningShared"
|
||||
v-model="wallet.sharedWalletId"
|
||||
:label="$t('shared_wallet_id')"
|
||||
emit-value
|
||||
map-options
|
||||
dense
|
||||
:options="inviteWalletOptions"
|
||||
class="q-mt-md"
|
||||
></q-select>
|
||||
<div v-if="isLightningShared" class="q-mt-md">
|
||||
<span v-text="$t('shared_wallet_desc')" class="q-mt-lg"></span>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
+161
-200
@@ -1231,213 +1231,174 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="apiAcl.showPasswordDialog" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<strong>User Password</strong>
|
||||
<div class="row q-mt-md q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="apiAcl.password"
|
||||
type="password"
|
||||
dense
|
||||
filled
|
||||
label="Password"
|
||||
hint="User password is required for this action."
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<lnbits-dialog
|
||||
:show="apiAcl.showPasswordDialog"
|
||||
title="Password Required"
|
||||
:action="{
|
||||
label: $t('ok')
|
||||
}"
|
||||
@update:show="apiAcl.showPasswordDialog = $event"
|
||||
@action="runPasswordGuardedFunction()"
|
||||
>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="apiAcl.password"
|
||||
type="password"
|
||||
dense
|
||||
filled
|
||||
label="Password"
|
||||
hint="User password is required for this action."
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('cancel')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
@click="runPasswordGuardedFunction()"
|
||||
:label="$t('ok')"
|
||||
color="primary"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-dialog v-model="apiAcl.showNewAclDialog" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<strong>New API Access Control List</strong>
|
||||
<div class="row q-mt-md q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input v-model="apiAcl.newAclName" dense filled label="ACL Name">
|
||||
</q-input>
|
||||
</div>
|
||||
<lnbits-dialog
|
||||
:show="apiAcl.showNewAclDialog"
|
||||
title="New API Access Control List"
|
||||
:action="{
|
||||
label: 'Create'
|
||||
}"
|
||||
:cancel-label="$t('close')"
|
||||
@update:show="apiAcl.showNewAclDialog = $event"
|
||||
@action="addApiACL()"
|
||||
>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input v-model="apiAcl.newAclName" dense filled label="ACL Name">
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn @click="addApiACL()" label="Create" color="primary"></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('close')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="apiAcl.showNewTokenDialog" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<strong>New API Token</strong>
|
||||
<div class="row q-col-gutter-md q-mt-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="apiAcl.newTokenName"
|
||||
dense
|
||||
filled
|
||||
label="Token Name"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="apiAcl.newTokenExpiry"
|
||||
dense
|
||||
filled
|
||||
label="Expiration"
|
||||
hit="Expiration time in minutes (default xxx)"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-date
|
||||
v-model="apiAcl.newTokenExpiry"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
>
|
||||
<div class="row items-center justify-end">
|
||||
<q-btn v-close-popup label="Close" color="primary" flat />
|
||||
</div>
|
||||
</q-date>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
|
||||
<template v-slot:append>
|
||||
<q-icon name="access_time" class="cursor-pointer">
|
||||
<q-popup-proxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
<lnbits-dialog
|
||||
:show="apiAcl.showNewTokenDialog"
|
||||
title="New API Token"
|
||||
:action="{
|
||||
label: 'Create'
|
||||
}"
|
||||
:cancel-label="$t('close')"
|
||||
@update:show="apiAcl.showNewTokenDialog = $event"
|
||||
@action="generateApiToken()"
|
||||
>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input v-model="apiAcl.newTokenName" dense filled label="Token Name">
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="apiAcl.newTokenExpiry"
|
||||
dense
|
||||
filled
|
||||
label="Expiration"
|
||||
hit="Expiration time in minutes (default xxx)"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-date v-model="apiAcl.newTokenExpiry" mask="YYYY-MM-DD HH:mm">
|
||||
<div class="row items-center justify-end">
|
||||
<q-btn v-close-popup label="Close" color="primary" flat />
|
||||
</div>
|
||||
</q-date>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
|
||||
<template v-slot:append>
|
||||
<q-icon name="access_time" class="cursor-pointer">
|
||||
<q-popup-proxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-time
|
||||
v-model="apiAcl.newTokenExpiry"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
format24h
|
||||
>
|
||||
<q-time
|
||||
v-model="apiAcl.newTokenExpiry"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
format24h
|
||||
>
|
||||
<div class="row items-center justify-end">
|
||||
<q-btn v-close-popup label="Close" color="primary" flat />
|
||||
</div>
|
||||
</q-time>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="row items-center justify-end">
|
||||
<q-btn v-close-popup label="Close" color="primary" flat />
|
||||
</div>
|
||||
</q-time>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
@click="generateApiToken()"
|
||||
label="Create"
|
||||
color="primary"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('close')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
|
||||
<lnbits-dialog
|
||||
:show="labelsDialog.show"
|
||||
:title="$t('label')"
|
||||
:action="{
|
||||
label: g.user.extra.labels.some(
|
||||
label => label.name === labelsDialog.data.name
|
||||
)
|
||||
? $t('update_label')
|
||||
: $t('add_label'),
|
||||
disable: !labelsDialog.data.name || !labelsDialog.data.color
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="labelsDialog.show = $event"
|
||||
@action="
|
||||
g.user.extra.labels.some(label => label.name === labelsDialog.data.name)
|
||||
? updateUserLabel()
|
||||
: addUserLabel()
|
||||
"
|
||||
>
|
||||
<div class="row q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="labelsDialog.data.name"
|
||||
dense
|
||||
filled
|
||||
:label="$t('name')"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="labelsDialog.show" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<strong v-text="$t('label')"></strong>
|
||||
<div class="row q-mt-md q-col-gutter-md">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="labelsDialog.data.name"
|
||||
dense
|
||||
filled
|
||||
:label="$t('name')"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="labelsDialog.data.description"
|
||||
dense
|
||||
filled
|
||||
type="textarea"
|
||||
rows="3"
|
||||
:label="$t('description')"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="labelsDialog.data.color"
|
||||
filled
|
||||
dense
|
||||
class="my-input"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="colorize" class="cursor-pointer">
|
||||
<q-popup-proxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-color
|
||||
v-model="labelsDialog.data.color"
|
||||
default-view="palette"
|
||||
/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="labelsDialog.data.description"
|
||||
dense
|
||||
filled
|
||||
type="textarea"
|
||||
rows="3"
|
||||
:label="$t('description')"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('cancel')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
g.user.extra.labels.some(
|
||||
label => label.name === labelsDialog.data.name
|
||||
)
|
||||
"
|
||||
@click="updateUserLabel()"
|
||||
:disable="!labelsDialog.data.name || !labelsDialog.data.color"
|
||||
:label="$t('update_label')"
|
||||
color="primary"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-else
|
||||
@click="addUserLabel()"
|
||||
:disable="!labelsDialog.data.name || !labelsDialog.data.color"
|
||||
:label="$t('add_label')"
|
||||
color="primary"
|
||||
></q-btn>
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
v-model="labelsDialog.data.color"
|
||||
filled
|
||||
dense
|
||||
class="my-input"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="colorize" class="cursor-pointer">
|
||||
<q-popup-proxy
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
>
|
||||
<q-color
|
||||
v-model="labelsDialog.data.color"
|
||||
default-view="palette"
|
||||
/>
|
||||
</q-popup-proxy>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
@@ -170,33 +170,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="auditDetailsDialog.show" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<strong v-text="$t('http_request_details')"></strong>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.trim="auditDetailsDialog.data"
|
||||
type="textarea"
|
||||
rows="25"
|
||||
></q-input>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
@click="utils.copyText(auditDetailsDialog.data)"
|
||||
icon="content_copy"
|
||||
color="grey"
|
||||
flat
|
||||
v-text="$t('copy')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('close')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<lnbits-dialog
|
||||
:show="auditDetailsDialog.show"
|
||||
:title="$t('http_request_details')"
|
||||
:action="{
|
||||
label: $t('copy'),
|
||||
icon: 'content_copy'
|
||||
}"
|
||||
:cancel-label="$t('close')"
|
||||
@update:show="auditDetailsDialog.show = $event"
|
||||
@action="utils.copyText(auditDetailsDialog.data)"
|
||||
>
|
||||
<q-input
|
||||
filled
|
||||
dense
|
||||
v-model.trim="auditDetailsDialog.data"
|
||||
type="textarea"
|
||||
rows="25"
|
||||
></q-input>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
@@ -366,72 +366,72 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-dialog v-model="showUninstallDialog" position="top">
|
||||
<q-card class="q-pa-lg">
|
||||
<h6 class="q-my-md text-primary" v-text="$t('warning')"></h6>
|
||||
<p>
|
||||
<span v-text="$t('extension_uninstall_warning')"></span><br />
|
||||
<span v-text="$t('confirm_continue')"></span>
|
||||
</p>
|
||||
<lnbits-dialog
|
||||
:show="showUninstallDialog"
|
||||
:title="$t('warning')"
|
||||
:action="{
|
||||
label: $t('uninstall_confirm')
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="showUninstallDialog = $event"
|
||||
@action="uninstallExtension()"
|
||||
>
|
||||
<p>
|
||||
<span v-text="$t('extension_uninstall_warning')"></span><br />
|
||||
<span v-text="$t('confirm_continue')"></span>
|
||||
</p>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-checkbox
|
||||
v-model="uninstallAndDropDb"
|
||||
value="false"
|
||||
label="Cleanup database tables"
|
||||
>
|
||||
<q-tooltip class="bg-grey-8" anchor="bottom left" self="top left"
|
||||
><span v-text="$t('extension_db_drop_info')"></span>
|
||||
</q-tooltip>
|
||||
</q-checkbox>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
outline
|
||||
color="grey"
|
||||
@click="uninstallExtension()"
|
||||
v-text="$t('uninstall_confirm')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<div class="row q-mt-lg">
|
||||
<q-checkbox
|
||||
v-model="uninstallAndDropDb"
|
||||
value="false"
|
||||
label="Cleanup database tables"
|
||||
>
|
||||
<q-tooltip class="bg-grey-8" anchor="bottom left" self="top left"
|
||||
><span v-text="$t('extension_db_drop_info')"></span>
|
||||
</q-tooltip>
|
||||
</q-checkbox>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-dialog v-model="showDropDbDialog" position="top">
|
||||
<q-card v-if="selectedExtension" class="q-pa-lg">
|
||||
<h6 class="q-my-md text-primary" v-text="$t('warning')"></h6>
|
||||
<p><span v-text="$t('extension_db_drop_warning')"></span><br /></p>
|
||||
<q-input
|
||||
v-model="dropDbExtensionId"
|
||||
:label="selectedExtension.id"
|
||||
></q-input>
|
||||
<br />
|
||||
<p v-text="$t('confirm_continue')"></p>
|
||||
<lnbits-dialog
|
||||
v-if="selectedExtension"
|
||||
:show="showDropDbDialog"
|
||||
:title="$t('warning')"
|
||||
:action="{
|
||||
label: $t('confirm'),
|
||||
color: 'red',
|
||||
disable: dropDbExtensionId !== selectedExtension.id
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="showDropDbDialog = $event"
|
||||
@action="dropExtensionDb()"
|
||||
>
|
||||
<p><span v-text="$t('extension_db_drop_warning')"></span><br /></p>
|
||||
<q-input
|
||||
v-model="dropDbExtensionId"
|
||||
:label="selectedExtension.id"
|
||||
></q-input>
|
||||
<br />
|
||||
<p v-text="$t('confirm_continue')"></p>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
:disable="dropDbExtensionId !== selectedExtension.id"
|
||||
outline
|
||||
color="red"
|
||||
@click="dropExtensionDb()"
|
||||
v-text="$t('confirm')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
:disable="dropDbExtensionId !== selectedExtension.id"
|
||||
outline
|
||||
color="red"
|
||||
@click="dropExtensionDb()"
|
||||
v-text="$t('confirm')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-dialog v-model="showManageExtensionDialog" position="top">
|
||||
<q-card v-if="selectedRelease" class="q-pa-lg lnbits__dialog-card">
|
||||
@@ -1244,76 +1244,61 @@
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="paymentDialog.show" position="top">
|
||||
<q-card class="q-pa-md lnbits__dialog-card">
|
||||
<q-card-section>
|
||||
<q-responsive :ratio="1" class="q-mx-xl q-mb-xl">
|
||||
<lnbits-qrcode
|
||||
:value="paymentDialog.invoice"
|
||||
:options="{width: 800}"
|
||||
class="rounded-borders"
|
||||
></lnbits-qrcode>
|
||||
</q-responsive>
|
||||
</q-card-section>
|
||||
<q-card-actions align="between">
|
||||
<q-btn v-close-popup flat color="grey" :label="$t('close')"></q-btn>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog v-model="showUpdateAllDialog" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h6 class="q-my-md" v-text="$t('update')"></h6>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="updatableExtensions?.length > 1" class="row">
|
||||
<div class="col-12">
|
||||
<q-btn
|
||||
outline
|
||||
color="grey"
|
||||
@click="selectAllUpdatableExtensionss()"
|
||||
v-text="$t('select_all')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<lnbits-dialog
|
||||
:show="paymentDialog.show"
|
||||
:cancel-label="$t('close')"
|
||||
@update:show="paymentDialog.show = $event"
|
||||
>
|
||||
<q-responsive :ratio="1" class="q-mx-xl q-mb-xl">
|
||||
<lnbits-qrcode
|
||||
:value="paymentDialog.invoice"
|
||||
:options="{width: 800}"
|
||||
class="rounded-borders"
|
||||
></lnbits-qrcode>
|
||||
</q-responsive>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-virtual-scroll :items="updatableExtensions" style="max-height: 400px">
|
||||
<template v-slot="{item, index}">
|
||||
<div class="row">
|
||||
<div class="q-col">
|
||||
<q-checkbox
|
||||
v-model="item.selectedForUpdate"
|
||||
:disable="item.isUpgraded"
|
||||
value="false"
|
||||
:label="item.name + ` (v${item.latestRelease?.version})`"
|
||||
>
|
||||
<q-spinner-bars
|
||||
v-if="item.inProgress"
|
||||
color="primary"
|
||||
size="1.5em"
|
||||
class="q-ml-md"
|
||||
></q-spinner-bars>
|
||||
</q-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-virtual-scroll>
|
||||
<div class="row q-mt-lg">
|
||||
<lnbits-dialog
|
||||
:show="showUpdateAllDialog"
|
||||
:title="$t('update')"
|
||||
:action="{
|
||||
label: $t('update')
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="showUpdateAllDialog = $event"
|
||||
@action="updateSelectedExtensions()"
|
||||
>
|
||||
<div v-if="updatableExtensions?.length > 1" class="row">
|
||||
<div class="col-12 q-mb-md">
|
||||
<q-btn
|
||||
@click="updateSelectedExtensions()"
|
||||
outline
|
||||
color="grey"
|
||||
v-text="$t('update')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
v-text="$t('cancel')"
|
||||
@click="selectAllUpdatableExtensionss()"
|
||||
v-text="$t('select_all')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
|
||||
<q-virtual-scroll :items="updatableExtensions" style="max-height: 400px">
|
||||
<template v-slot="{item, index}">
|
||||
<div class="row">
|
||||
<div class="q-col">
|
||||
<q-checkbox
|
||||
v-model="item.selectedForUpdate"
|
||||
:disable="item.isUpgraded"
|
||||
value="false"
|
||||
:label="item.name + ` (v${item.latestRelease?.version})`"
|
||||
>
|
||||
<q-spinner-bars
|
||||
v-if="item.inProgress"
|
||||
color="primary"
|
||||
size="1.5em"
|
||||
class="q-ml-md"
|
||||
></q-spinner-bars>
|
||||
</q-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-virtual-scroll>
|
||||
</lnbits-dialog>
|
||||
</template>
|
||||
|
||||
+117
-154
@@ -103,164 +103,127 @@
|
||||
</q-card-section>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="channels">
|
||||
<q-dialog v-model="connectPeerDialog.show" position="top">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form class="q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="text"
|
||||
filled
|
||||
v-model="connectPeerDialog.data.uri"
|
||||
label="Node URI"
|
||||
hint="pubkey@host:port"
|
||||
></q-input>
|
||||
<lnbits-dialog
|
||||
:show="connectPeerDialog.show"
|
||||
:action="{
|
||||
label: $t('connect')
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="connectPeerDialog.show = $event"
|
||||
@action="connectPeer"
|
||||
>
|
||||
<q-form class="q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="text"
|
||||
filled
|
||||
v-model="connectPeerDialog.data.uri"
|
||||
label="Node URI"
|
||||
hint="pubkey@host:port"
|
||||
></q-input>
|
||||
</q-form>
|
||||
</lnbits-dialog>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
:label="$t('connect')"
|
||||
color="primary"
|
||||
@click="connectPeer"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<lnbits-dialog
|
||||
:show="setFeeDialog.show"
|
||||
title="Set Channel Fee"
|
||||
:action="{
|
||||
label: $t('set')
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="setFeeDialog.show = $event"
|
||||
@action="setChannelFee(setFeeDialog.channel_id)"
|
||||
>
|
||||
<p class="text-caption" v-text="setFeeDialog.channel_id"></p>
|
||||
<q-separator></q-separator>
|
||||
<q-form class="q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="setFeeDialog.data.fee_ppm"
|
||||
label="Fee Rate PPM"
|
||||
></q-input>
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="setFeeDialog.data.fee_base_msat"
|
||||
label="Fee Base msat"
|
||||
></q-input>
|
||||
</q-form>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-dialog v-model="setFeeDialog.show">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<label class="text-h6">Set Channel Fee</label>
|
||||
<p class="text-caption" v-text="setFeeDialog.channel_id"></p>
|
||||
<q-separator></q-separator>
|
||||
<q-form class="q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="setFeeDialog.data.fee_ppm"
|
||||
label="Fee Rate PPM"
|
||||
></q-input>
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="setFeeDialog.data.fee_base_msat"
|
||||
label="Fee Base msat"
|
||||
></q-input>
|
||||
<lnbits-dialog
|
||||
:show="openChannelDialog.show"
|
||||
:action="{
|
||||
label: $t('open')
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="openChannelDialog.show = $event"
|
||||
@action="openChannel"
|
||||
>
|
||||
<q-form class="q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="text"
|
||||
filled
|
||||
v-model="openChannelDialog.data.peer_id"
|
||||
label="Peer ID"
|
||||
></q-input>
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="openChannelDialog.data.funding_amount"
|
||||
label="Funding Amount"
|
||||
></q-input>
|
||||
<q-expansion-item icon="warning" label="Advanced">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="column q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="openChannelDialog.data.push_amount"
|
||||
label="Push Amount"
|
||||
hint="This gifts sats to the other side!"
|
||||
></q-input>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
:label="$t('set')"
|
||||
color="primary"
|
||||
@click="setChannelFee(setFeeDialog.channel_id)"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="openChannelDialog.data.fee_rate"
|
||||
label="Fee Rate"
|
||||
></q-input>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-expansion-item>
|
||||
</q-form>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-dialog v-model="openChannelDialog.show">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form class="q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="text"
|
||||
filled
|
||||
v-model="openChannelDialog.data.peer_id"
|
||||
label="Peer ID"
|
||||
></q-input>
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="openChannelDialog.data.funding_amount"
|
||||
label="Funding Amount"
|
||||
></q-input>
|
||||
<q-expansion-item icon="warning" label="Advanced">
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="column q-gutter-md">
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="
|
||||
openChannelDialog.data.push_amount
|
||||
"
|
||||
label="Push Amount"
|
||||
hint="This gifts sats to the other side!"
|
||||
></q-input>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
type="number"
|
||||
filled
|
||||
v-model.number="openChannelDialog.data.fee_rate"
|
||||
label="Fee Rate"
|
||||
></q-input>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-expansion-item>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
:label="$t('open')"
|
||||
color="primary"
|
||||
@click="openChannel"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog v-model="closeChannelDialog.show" position="top">
|
||||
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||
<q-form class="q-gutter-md">
|
||||
<div>
|
||||
<q-checkbox
|
||||
v-model="closeChannelDialog.data.force"
|
||||
label="Force"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
:label="$t('close')"
|
||||
color="primary"
|
||||
@click="closeChannel"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-close-popup
|
||||
flat
|
||||
color="grey"
|
||||
class="q-ml-auto"
|
||||
:label="$t('cancel')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<lnbits-dialog
|
||||
:show="closeChannelDialog.show"
|
||||
title="Close Channel"
|
||||
:action="{
|
||||
label: $t('close')
|
||||
}"
|
||||
:cancel-label="$t('cancel')"
|
||||
@update:show="closeChannelDialog.show = $event"
|
||||
@action="closeChannel"
|
||||
>
|
||||
<q-form class="q-gutter-md">
|
||||
<div>
|
||||
<q-checkbox
|
||||
v-model="closeChannelDialog.data.force"
|
||||
label="Force"
|
||||
/>
|
||||
</div>
|
||||
</q-form>
|
||||
</lnbits-dialog>
|
||||
|
||||
<q-card-section class="q-pa-none">
|
||||
<div class="row q-col-gutter-lg">
|
||||
|
||||
@@ -446,50 +446,44 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="activeWallet.show">
|
||||
<q-dialog v-model="createWalletDialog.show" position="top">
|
||||
<q-card class="q-pa-md q-pt-md lnbits__dialog-card">
|
||||
<strong>Create Wallet</strong>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row q-mt-lg">
|
||||
<div class="col">
|
||||
<q-input
|
||||
v-model="createWalletDialog.data.name"
|
||||
:label="$t('name_your_wallet')"
|
||||
filled
|
||||
dense
|
||||
class="q-mb-md"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<div class="col">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
v-model="createWalletDialog.data.currency"
|
||||
:options="{{ currencies | safe }}"
|
||||
></q-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
v-close-popup
|
||||
@click="createWallet()"
|
||||
unelevated
|
||||
color="primary"
|
||||
type="submit"
|
||||
>Create</q-btn
|
||||
>
|
||||
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
|
||||
>Cancel</q-btn
|
||||
<lnbits-dialog
|
||||
:show="createWalletDialog.show"
|
||||
title="Create Wallet"
|
||||
:action="{
|
||||
label: 'Create',
|
||||
closePopup: true
|
||||
}"
|
||||
cancel-label="Cancel"
|
||||
@update:show="createWalletDialog.show = $event"
|
||||
@action="createWallet"
|
||||
>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row q-mt-lg">
|
||||
<div class="col">
|
||||
<q-input
|
||||
v-model="createWalletDialog.data.name"
|
||||
:label="$t('name_your_wallet')"
|
||||
filled
|
||||
dense
|
||||
class="q-mb-md"
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-mt-lg">
|
||||
<div class="col">
|
||||
<q-select
|
||||
filled
|
||||
dense
|
||||
v-model="createWalletDialog.data.currency"
|
||||
:options="g.allowedCurrencies"
|
||||
></q-select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</lnbits-dialog>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="row q-col-gutter-md q-mb-md">
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
"js/components/admin/lnbits-admin-site-customisation.js",
|
||||
"js/components/admin/lnbits-admin-assets-config.js",
|
||||
"js/components/admin/lnbits-admin-audit.js",
|
||||
"js/components/lnbits-dialog.js",
|
||||
"js/components/lnbits-wallet-charts.js",
|
||||
"js/components/lnbits-wallet-api-docs.js",
|
||||
"js/components/lnbits-wallet-icon.js",
|
||||
|
||||
Reference in New Issue
Block a user