diff --git a/lnbits/core/static/js/wallet.js b/lnbits/core/static/js/wallet.js index 7c4ac849c..60dd687da 100644 --- a/lnbits/core/static/js/wallet.js +++ b/lnbits/core/static/js/wallet.js @@ -137,6 +137,9 @@ new Vue({ comment: '' }, paymentChecker: null, + copy: { + show: false + }, camera: { show: false, camera: 'auto' @@ -302,6 +305,8 @@ new Vue({ this.parse.invoice = null this.parse.lnurlpay = null this.parse.lnurlauth = null + this.parse.copy.show = + window.isSecureContext && navigator.clipboard?.readText !== undefined this.parse.data.request = '' this.parse.data.comment = '' this.parse.data.paymentChecker = null diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index 9bfe2943d..fd4a9dee9 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -726,6 +726,7 @@ name="content_paste" color="grey" class="q-mt-xs q-ml-sm q-mr-auto" + v-if="parse.copy.show" @click="pasteToTextArea" >{% raw %}{{$t('paste_from_clipboard')}}{% endraw