mirror of
https://github.com/lnbits/lnbits.git
synced 2025-05-30 17:49:55 +02:00
UI: paste payment request from clipboard (#1845)
* paste payment request from clipboard * remove unelevated
This commit is contained in:
parent
9f40b3cdbd
commit
9bc8a9db55
@ -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 => {
|
||||
|
@ -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: {
|
||||
|
@ -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
|
||||
|
2
lnbits/static/bundle.min.js
vendored
2
lnbits/static/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user