refactor: use utils.copytext (#3590)
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -700,7 +700,7 @@ window.app.component('lnbits-node-qrcode', {
|
||||
dense
|
||||
unelevated
|
||||
size="md"
|
||||
@click="copyText(info.id)"
|
||||
@click="utils.copyText(info.id)"
|
||||
>Public Key<q-tooltip> Click to copy </q-tooltip>
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
@@ -781,7 +781,7 @@ window.app.component('lnbits-node-info', {
|
||||
flat
|
||||
dense
|
||||
icon='content_paste'
|
||||
@click='copyText(info.id)'
|
||||
@click='utils.copyText(info.id)'
|
||||
></q-btn>
|
||||
<q-btn
|
||||
size='xs'
|
||||
|
||||
@@ -43,7 +43,7 @@ window.app.component('lnbits-qrcode', {
|
||||
methods: {
|
||||
clickQrCode(event) {
|
||||
if (this.href === '') {
|
||||
this.copyText(this.value)
|
||||
this.utils.copyText(this.value)
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
return false
|
||||
|
||||
@@ -607,7 +607,7 @@ window.PageAccount = {
|
||||
},
|
||||
copyAssetLinkToClipboard(asset) {
|
||||
const assetUrl = `${window.location.origin}/api/v1/assets/${asset.id}/binary`
|
||||
this.copyText(assetUrl)
|
||||
this.utils.copyText(assetUrl)
|
||||
},
|
||||
addUserLabel() {
|
||||
if (!this.labelsDialog.data.name) {
|
||||
|
||||
@@ -198,7 +198,7 @@ window.PageUsers = {
|
||||
)
|
||||
.onOk(() => {
|
||||
const url = window.location.origin + '?reset_key=' + res.data
|
||||
this.copyText(url)
|
||||
this.utils.copyText(url)
|
||||
})
|
||||
})
|
||||
.catch(LNbits.utils.notifyApiError)
|
||||
@@ -347,7 +347,7 @@ window.PageUsers = {
|
||||
},
|
||||
copyWalletLink(walletId) {
|
||||
const url = `${window.location.origin}/wallet?usr=${this.activeWallet.userId}&wal=${walletId}`
|
||||
this.copyText(url)
|
||||
this.utils.copyText(url)
|
||||
},
|
||||
fetchUsers(props) {
|
||||
this.relaxFilterForFields(['username', 'email'])
|
||||
|
||||
@@ -163,7 +163,7 @@ include('components/lnbits-wallet-extra.vue') %}
|
||||
<q-item-label>
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="copyText(payment.payment_hash)"
|
||||
@click="utils.copyText(payment.payment_hash)"
|
||||
size="1em"
|
||||
color="grey"
|
||||
class="cursor-pointer"
|
||||
@@ -188,7 +188,7 @@ include('components/lnbits-wallet-extra.vue') %}
|
||||
<q-item-label>
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="copyText(payment.bolt11)"
|
||||
@click="utils.copyText(payment.bolt11)"
|
||||
size="1em"
|
||||
color="grey"
|
||||
class="cursor-pointer"
|
||||
@@ -234,7 +234,7 @@ include('components/lnbits-wallet-extra.vue') %}
|
||||
<q-item-label>
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="copyText(payment.preimage)"
|
||||
@click="utils.copyText(payment.preimage)"
|
||||
size="1em"
|
||||
color="grey"
|
||||
class="cursor-pointer"
|
||||
@@ -553,7 +553,7 @@ include('components/lnbits-wallet-extra.vue') %}
|
||||
flat
|
||||
dense
|
||||
class="text-grey"
|
||||
@click="copyText(value)"
|
||||
@click="utils.copyText(value)"
|
||||
icon="content_copy"
|
||||
>
|
||||
<q-tooltip>Copy</q-tooltip>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
>
|
||||
<q-btn
|
||||
v-if="prop.copy"
|
||||
@click="copyText(formData[key])"
|
||||
@click="utils.copyText(formData[key])"
|
||||
icon="content_copy"
|
||||
class="cursor-pointer"
|
||||
color="grey"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
class="cursor-pointer"
|
||||
@click="copyText(g.wallet.id)"
|
||||
@click="utils.copyText(g.wallet.id)"
|
||||
></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
@@ -47,7 +47,7 @@
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
class="cursor-pointer q-ml-sm"
|
||||
@click="copyText(g.wallet.adminkey)"
|
||||
@click="utils.copyText(g.wallet.adminkey)"
|
||||
></q-icon>
|
||||
<q-icon name="qr_code" class="cursor-pointer q-ml-sm">
|
||||
<q-popup-proxy>
|
||||
@@ -81,7 +81,7 @@
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
class="cursor-pointer q-ml-sm"
|
||||
@click="copyText(g.wallet.inkey)"
|
||||
@click="utils.copyText(g.wallet.inkey)"
|
||||
></q-icon>
|
||||
<q-icon name="qr_code" class="cursor-pointer q-ml-sm">
|
||||
<q-popup-proxy>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
color="secondary"
|
||||
icon="content_copy"
|
||||
size="xs"
|
||||
@click="copyText(paylink.lnurl)"
|
||||
@click="utils.copyText(paylink.lnurl)"
|
||||
>
|
||||
<q-tooltip>
|
||||
<span v-text="`copy: ${paylink.lnurl}`"></span>
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
class="cursor-pointer q-ml-sm"
|
||||
@click="copyText(g.wallet.sharedWalletId)"
|
||||
@click="utils.copyText(g.wallet.sharedWalletId)"
|
||||
></q-icon>
|
||||
<q-icon name="qr_code" class="cursor-pointer q-ml-sm">
|
||||
<q-popup-proxy>
|
||||
|
||||
@@ -774,7 +774,9 @@
|
||||
></q-btn>
|
||||
|
||||
<q-btn
|
||||
@click="copyText(apiAcl.apiToken)"
|
||||
@click="
|
||||
utils.copyText(apiAcl.apiToken)
|
||||
"
|
||||
icon="content_copy"
|
||||
color="black"
|
||||
flat
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
size="sm"
|
||||
flat
|
||||
class="cursor-pointer q-mr-xs"
|
||||
@click="copyText(props.row[col.name])"
|
||||
@click="utils.copyText(props.row[col.name])"
|
||||
>
|
||||
<q-tooltip>Copy</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
<div class="row q-mt-lg">
|
||||
<q-btn
|
||||
@click="copyText(auditDetailsDialog.data)"
|
||||
@click="utils.copyText(auditDetailsDialog.data)"
|
||||
icon="content_copy"
|
||||
color="grey"
|
||||
flat
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
v-if="selectedRelease.paymentRequest"
|
||||
outline
|
||||
color="grey"
|
||||
@click="copyText(selectedRelease.paymentRequest)"
|
||||
@click="utils.copyText(selectedRelease.paymentRequest)"
|
||||
:label="$t('copy_invoice')"
|
||||
></q-btn>
|
||||
</div>
|
||||
@@ -816,7 +816,9 @@
|
||||
v-if="selectedExtension.payToEnable.paymentRequest"
|
||||
outline
|
||||
color="grey"
|
||||
@click="copyText(selectedExtension.payToEnable.paymentRequest)"
|
||||
@click="
|
||||
utils.copyText(selectedExtension.payToEnable.paymentRequest)
|
||||
"
|
||||
:label="$t('copy_invoice')"
|
||||
></q-btn>
|
||||
</div>
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
flat
|
||||
dense
|
||||
icon="content_paste"
|
||||
@click="copyText(props.row.peer_id)"
|
||||
@click="utils.copyText(props.row.peer_id)"
|
||||
></q-btn>
|
||||
</div>
|
||||
<div class="text-caption col-grow">
|
||||
@@ -365,7 +365,7 @@
|
||||
flat
|
||||
dense
|
||||
icon="content_paste"
|
||||
@click="copyText(props.row.id)"
|
||||
@click="utils.copyText(props.row.id)"
|
||||
></q-btn>
|
||||
</div>
|
||||
<div
|
||||
@@ -378,7 +378,9 @@
|
||||
flat
|
||||
dense
|
||||
icon="content_paste"
|
||||
@click="copyText(props.row.short_id)"
|
||||
@click="
|
||||
utils.copyText(props.row.short_id)
|
||||
"
|
||||
></q-btn>
|
||||
</div>
|
||||
<q-badge
|
||||
@@ -475,7 +477,7 @@
|
||||
flat
|
||||
dense
|
||||
icon="content_paste"
|
||||
@click="copyText(props.row.id)"
|
||||
@click="utils.copyText(props.row.id)"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
size="xs"
|
||||
@@ -546,7 +548,7 @@
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="
|
||||
copyText(
|
||||
utils.copyText(
|
||||
transactionDetailsDialog.data.payment_hash
|
||||
)
|
||||
"
|
||||
@@ -572,7 +574,7 @@
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="
|
||||
copyText(
|
||||
utils.copyText(
|
||||
transactionDetailsDialog.data.preimage
|
||||
)
|
||||
"
|
||||
@@ -608,7 +610,9 @@
|
||||
outline
|
||||
color="grey"
|
||||
@click="
|
||||
copyText(transactionDetailsDialog.data.bolt11)
|
||||
utils.copyText(
|
||||
transactionDetailsDialog.data.bolt11
|
||||
)
|
||||
"
|
||||
:label="$t('copy_invoice')"
|
||||
class="q-mt-sm"
|
||||
@@ -718,7 +722,9 @@
|
||||
<q-btn
|
||||
outline
|
||||
color="grey"
|
||||
@click="copyText(props.row.bolt11)"
|
||||
@click="
|
||||
utils.copyText(props.row.bolt11)
|
||||
"
|
||||
:label="$t('copy_invoice')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
@@ -813,7 +819,7 @@
|
||||
flat
|
||||
dense
|
||||
icon="content_paste"
|
||||
@click="copyText(info.id)"
|
||||
@click="utils.copyText(info.id)"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
size="xs"
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
size="sm"
|
||||
flat
|
||||
class="cursor-pointer q-mr-xs"
|
||||
@click="copyText(props.row[col.name])"
|
||||
@click="utils.copyText(props.row[col.name])"
|
||||
>
|
||||
<q-tooltip anchor="top middle">Copy</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -430,7 +430,7 @@
|
||||
icon="content_copy"
|
||||
flat
|
||||
class="cursor-pointer q-ml-sm"
|
||||
@click="copyText(value)"
|
||||
@click="utils.copyText(value)"
|
||||
>
|
||||
<q-tooltip>Copy</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
size="sm"
|
||||
color="primary"
|
||||
class="q-ml-xs"
|
||||
@click="copyText(props.row.adminkey)"
|
||||
@click="utils.copyText(props.row.adminkey)"
|
||||
>
|
||||
<q-tooltip>Copy Admin Key</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -104,7 +104,7 @@
|
||||
size="sm"
|
||||
color="secondary"
|
||||
class="q-ml-xs"
|
||||
@click="copyText(props.row.inkey)"
|
||||
@click="utils.copyText(props.row.inkey)"
|
||||
>
|
||||
<q-tooltip>Copy Invoice Key</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -181,7 +181,7 @@
|
||||
size="sm"
|
||||
flat
|
||||
class="cursor-pointer q-mr-xs"
|
||||
@click="copyText(props.row.id)"
|
||||
@click="utils.copyText(props.row.id)"
|
||||
>
|
||||
<q-tooltip>Copy Wallet ID</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -650,7 +650,7 @@
|
||||
size="sm"
|
||||
flat
|
||||
class="cursor-pointer q-mr-xs"
|
||||
@click="copyText(props.row.id)"
|
||||
@click="utils.copyText(props.row.id)"
|
||||
>
|
||||
<q-tooltip>Copy User ID</q-tooltip>
|
||||
</q-btn>
|
||||
@@ -667,7 +667,7 @@
|
||||
size="sm"
|
||||
flat
|
||||
class="cursor-pointer q-mr-xs"
|
||||
@click="copyText(props.row.pubkey)"
|
||||
@click="utils.copyText(props.row.pubkey)"
|
||||
>
|
||||
<q-tooltip>Copy Public Key</q-tooltip>
|
||||
</q-btn>
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
<q-item-label>
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="copyText(parse.invoice.hash)"
|
||||
@click="utils.copyText(parse.invoice.hash)"
|
||||
size="1em"
|
||||
color="grey"
|
||||
class="cursor-pointer"
|
||||
@@ -574,7 +574,7 @@
|
||||
<q-item-label>
|
||||
<q-icon
|
||||
name="content_copy"
|
||||
@click="copyText(parse.invoice.bolt11)"
|
||||
@click="utils.copyText(parse.invoice.bolt11)"
|
||||
size="1em"
|
||||
color="grey"
|
||||
class="cursor-pointer"
|
||||
|
||||
Reference in New Issue
Block a user