From 5806beaeb7acb0b8fd3179b8544bce40df754294 Mon Sep 17 00:00:00 2001 From: Eneko Illarramendi Date: Tue, 21 Apr 2020 15:29:23 +0200 Subject: [PATCH] feat(core): move disclaimer to wallet page --- lnbits/core/static/js/wallet.js | 9 +++++++++ lnbits/core/templates/core/index.html | 12 ------------ lnbits/core/templates/core/wallet.html | 12 ++++++++++++ 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/lnbits/core/static/js/wallet.js b/lnbits/core/static/js/wallet.js index 27e28ed..45e3ec6 100644 --- a/lnbits/core/static/js/wallet.js +++ b/lnbits/core/static/js/wallet.js @@ -138,6 +138,10 @@ new Vue({ }, paymentsChart: { show: false + }, + disclaimerDialog: { + show: false, + location: window.location } }; }, @@ -339,5 +343,10 @@ new Vue({ created: function () { this.fetchPayments(); setTimeout(this.checkPendingPayments(), 1200); + + if (!this.$q.localStorage.getItem('lnbits.disclaimerShown')) { + this.disclaimerDialog.show = true; + this.$q.localStorage.set('lnbits.disclaimerShown', true); + }; } }); diff --git a/lnbits/core/templates/core/index.html b/lnbits/core/templates/core/index.html index ad098d1..6b0fd84 100644 --- a/lnbits/core/templates/core/index.html +++ b/lnbits/core/templates/core/index.html @@ -85,16 +85,4 @@ - - - -
WARNING
-

- Login functionality to be released in V0.2, for now make sure you bookmark to save your wallet!

- This service is in BETA, and we hold no responsibility for people losing access to funds.

- To encourage you to run your own LNbits, any balance on lnbits.com will incur a charge of 1% per week. -

- Proceed -
-
{% endblock %} diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index 4bf947e..7bfad81 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -241,4 +241,16 @@ + + + +
Warning
+

Login functionality to be released in v0.2, for now, make sure you bookmark this page for future access to your wallet!

+

This service is in BETA, and we hold no responsibility for people losing access to funds. To encourage you to run your own LNbits installation, any balance on {% raw %}{{ disclaimerDialog.location.host }}{% endraw %} will incur a charge of 1% service fee per week.

+
+ Copy wallet URL + I understand +
+
+
{% endblock %}