From 364b6dc857fe7d465cc4b2ba44ad7ceaa2e6d398 Mon Sep 17 00:00:00 2001 From: Eneko Illarramendi Date: Tue, 21 Apr 2020 08:16:56 +0200 Subject: [PATCH] fix(vue): use @submit to send forms, and catch users pressing return --- lnbits/core/templates/core/index.html | 60 +++++++--------- lnbits/core/templates/core/wallet.html | 10 +-- .../amilk/templates/amilk/index.html | 16 ++--- .../templates/diagonalley/index.html | 70 +++++++------------ .../paywall/templates/paywall/index.html | 4 +- .../extensions/tpos/templates/tpos/index.html | 4 +- 6 files changed, 68 insertions(+), 96 deletions(-) diff --git a/lnbits/core/templates/core/index.html b/lnbits/core/templates/core/index.html index 32c31d41d..d0124dc2b 100644 --- a/lnbits/core/templates/core/index.html +++ b/lnbits/core/templates/core/index.html @@ -22,7 +22,7 @@ Press to claim bitcoin {% else %} - + Add a new wallet - - - - - - -
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 -
-
- - - + type="submit">Add a new wallet
{% endif %} @@ -62,19 +40,19 @@

LNbits

Free and open-source lightning wallet
-

Easy to set up and lightweight, LNbits can run on any lightning-network funding source, currently supporting LND, Clightning, Opennode, Lntxbot, Lnpay and even LNbits itself!

+

Easy to set up and lightweight, LNbits can run on any lightning-network funding source, currently supporting LND, c-lightning, OpenNode, lntxbot, LNPay and even LNbits itself!

You can run LNbits for yourself, or easily offer a custodian solution for others.

Each wallet has its own API keys and there is no limit to the number of wallets you can make. Being able to partition funds makes LNbits a useful tool for money management and as a development tool.

Extensions add extra functionality to LNbits so you can experiment with a range of cutting-edge technologies on the lightning network. We have made developing extensions as easy as possible, and as a free and open-source project, we encourage people to develop and submit their own.

+
+ View project in GitHub + Donate +
- - View project in GitHub - Donate - @@ -85,7 +63,7 @@
- +
@@ -93,7 +71,7 @@
- +
@@ -107,4 +85,16 @@ + + + +
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 c8e72e81e..5335d956d 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -145,7 +145,7 @@ - + Create invoice + type="submit">Create invoice Cancel @@ -173,7 +173,7 @@
- Copy invoice + Copy invoice Close
@@ -182,7 +182,7 @@
- + Read invoice + type="submit">Read invoice Cancel
diff --git a/lnbits/extensions/amilk/templates/amilk/index.html b/lnbits/extensions/amilk/templates/amilk/index.html index 4a2c67d33..9640f1987 100644 --- a/lnbits/extensions/amilk/templates/amilk/index.html +++ b/lnbits/extensions/amilk/templates/amilk/index.html @@ -79,7 +79,7 @@ - + Create amilk + type="submit">Create amilk Cancel @@ -151,23 +151,23 @@ '/amilk/api/v1/amilk?all_wallets', this.g.user.wallets[0].inkey ).then(function (response) { - self.amilks = response.data.map(function (obj) { + self.amilks = response.data.map(function (obj) { response.data.forEach(MILK); function MILK(item){ - window.setInterval(function(){ - - + window.setInterval(function(){ + + LNbits.api.request( 'GET', '/amilk/api/v1/amilk/milk/' + item.id, "Lorem" ).then(function (response) { - self.amilks = response.data.map(function (obj) { + self.amilks = response.data.map(function (obj) { return mapAMilk(obj); }); }); - }, + }, item.atime*1000); } diff --git a/lnbits/extensions/diagonalley/templates/diagonalley/index.html b/lnbits/extensions/diagonalley/templates/diagonalley/index.html index c435d118a..287a5092c 100644 --- a/lnbits/extensions/diagonalley/templates/diagonalley/index.html +++ b/lnbits/extensions/diagonalley/templates/diagonalley/index.html @@ -11,7 +11,7 @@ New Product New Indexer - Frontend shop your stall will list its products in + Frontend shop your stall will list its products in @@ -95,7 +95,7 @@ {% raw %}