From 56eea18b2d87bcbf2d8a5f44c8aef7eb9b86caf5 Mon Sep 17 00:00:00 2001 From: lepipele Date: Tue, 13 Mar 2018 00:34:26 -0500 Subject: [PATCH] Bugfixing loading spinner when switching currency Moving it to buttons so it directly interacts with actions and doesn't break form states --- BTCPayServer/Views/Invoice/Checkout.cshtml | 16 ++++++++-------- BTCPayServer/wwwroot/css/normalizer.css | 7 +++---- BTCPayServer/wwwroot/js/core.js | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index 7f2ac29bb..dec3105f2 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -93,7 +93,7 @@
-
+
@foreach (var crypto in Model.AvailableCryptos) { @@ -101,6 +101,13 @@ }
+
+ + + + + +
} @@ -180,13 +187,6 @@ -
- - - - - -
diff --git a/BTCPayServer/wwwroot/css/normalizer.css b/BTCPayServer/wwwroot/css/normalizer.css index bae0b5330..367f92900 100644 --- a/BTCPayServer/wwwroot/css/normalizer.css +++ b/BTCPayServer/wwwroot/css/normalizer.css @@ -10894,14 +10894,13 @@ bp-spinner { } .payment__spinner { - margin-top: 140px; display: none; } .payment__spinner > bp-spinner > svg { - margin: auto auto; - height: 60px; - width: 60px; + margin: auto 0px 0px auto; + height: 32px; + width: 32px; fill: gray; animation: spin 0.55s linear infinite; opacity: .85; diff --git a/BTCPayServer/wwwroot/js/core.js b/BTCPayServer/wwwroot/js/core.js index bffe67348..8946e2181 100644 --- a/BTCPayServer/wwwroot/js/core.js +++ b/BTCPayServer/wwwroot/js/core.js @@ -49,7 +49,7 @@ function onDataCallback(jsonData) { // restoring qr code view only when currency is switched if (jsonData.paymentMethodId == srvModel.paymentMethodId) { - $("#scan").show(); + $(".payment__currencies").show(); $(".payment__spinner").hide(); } @@ -59,7 +59,7 @@ function onDataCallback(jsonData) { function changeCurrency(currency) { if (srvModel.paymentMethodId != currency) { - $("#scan").hide(); + $(".payment__currencies").hide(); $(".payment__spinner").show(); srvModel.paymentMethodId = currency; fetchStatus();