UI: paste payment request from clipboard (#1845)

* paste payment request from clipboard

* remove unelevated
This commit is contained in:
callebtc 2023-08-02 13:42:23 +02:00 committed by GitHub
parent 9f40b3cdbd
commit 9bc8a9db55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// update cache version every time there is a new deployment
// so the service worker reinitializes the cache
const CACHE_VERSION = 50
const CACHE_VERSION = 51
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => {

View File

@ -795,6 +795,11 @@ new Vue({
field: 'pending'
})
LNbits.utils.exportCSV(columns, this.payments)
},
pasteToTextArea: function () {
navigator.clipboard.readText().then(text => {
this.$refs.textArea.value = text
})
}
},
watch: {

View File

@ -711,6 +711,7 @@
v-model.trim="parse.data.request"
type="textarea"
:label="$t('paste_invoice_label')"
ref="textArea"
>
</q-input>
<div class="row q-mt-lg">
@ -721,6 +722,16 @@
type="submit"
:label="$t('read')"
></q-btn>
<q-icon
name="content_paste"
color="grey"
class="q-mt-xs q-ml-sm q-mr-auto"
@click="pasteToTextArea"
><q-tooltip
>{% raw %}{{$t('paste_from_clipboard')}}{% endraw
%}</q-tooltip
></q-icon
>
<q-btn
v-close-popup
flat

File diff suppressed because one or more lines are too long

View File

@ -42,6 +42,8 @@ window.localisation.en = {
runs_on: 'Runs on',
credit_hint: 'Press Enter to credit account',
credit_label: '%{denomination} to credit',
paste: 'Paste',
paste_from_clipboard: 'Paste from clipboard',
paste_request: 'Paste Request',
create_invoice: 'Create Invoice',
camera_tooltip: 'Use camera to scan an invoice/QR',