From 293edd0d6be4fab682c4e9edbfcd953c7fc34c46 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Thu, 22 Dec 2022 12:07:38 +0000 Subject: [PATCH] bring key backup and add bookmark dialog --- .../shop/templates/shop/_dialogs.html | 1 + .../extensions/shop/templates/shop/order.html | 38 ++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/lnbits/extensions/shop/templates/shop/_dialogs.html b/lnbits/extensions/shop/templates/shop/_dialogs.html index 779af035..a55d7614 100644 --- a/lnbits/extensions/shop/templates/shop/_dialogs.html +++ b/lnbits/extensions/shop/templates/shop/_dialogs.html @@ -339,6 +339,7 @@ +
How to use Shop
diff --git a/lnbits/extensions/shop/templates/shop/order.html b/lnbits/extensions/shop/templates/shop/order.html index de4a109c..0df0acb3 100644 --- a/lnbits/extensions/shop/templates/shop/order.html +++ b/lnbits/extensions/shop/templates/shop/order.html @@ -103,11 +103,7 @@ -

Bellow are the keys needed to contact the merchant. They are stored in the browser! @@ -242,6 +238,28 @@ + + + +

Bookmark this page
+

+ Don't forget to bookmark this page to be able to check on your order! +

+

+ You can backup your keys, and export the page to another device also. +

+
+ Close +
+
+
{% endblock %} {% block scripts %} @@ -262,6 +280,13 @@ mixins: [windowMixin], data: function () { return { + lnbitsBookmark: { + show: true, + finish: () => { + this.$q.localStorage.set('lnbits.shopbookmark', false) + this.lnbitsBookmark.show = false + } + }, newMessage: '', showMessages: false, messages: {}, @@ -418,6 +443,9 @@ } }, async created() { + let showBookmark = this.$q.localStorage.getItem('lnbits.shopbookmark') + this.lnbitsBookmark.show = showBookmark === true || showBookmark == null + let order_details = JSON.parse('{{ order | tojson }}') let products = JSON.parse('{{ products | tojson }}') let order_id = '{{ order_id }}'