diff --git a/BTCPayServer/Views/AppsPublic/Crowdfund/VueCrowdfund.cshtml b/BTCPayServer/Views/AppsPublic/Crowdfund/VueCrowdfund.cshtml index 2e37f7acd..710d49b25 100644 --- a/BTCPayServer/Views/AppsPublic/Crowdfund/VueCrowdfund.cshtml +++ b/BTCPayServer/Views/AppsPublic/Crowdfund/VueCrowdfund.cshtml @@ -45,40 +45,40 @@
-
-
-
{{srvModel.info.currentAmount + srvModel.info.currentPendingAmount }} {{targetCurrency}}
-
Raised
-
-
-
{{srvModel.info.progressPercentage + srvModel.info.pendingProgressPercentage }}%
-
Of Goal
-
-
-
- {{srvModel.info.totalContributors}} -
-
Contributors
-
-
-
- {{endDiff}} -
-
Left
-
-
-
- {{startDiff}} -
-
Left to start
-
-
-
- Campaign -
-
not active
-
-
+
+
+
{{srvModel.info.currentAmount + srvModel.info.currentPendingAmount }} {{targetCurrency}}
+
Raised
+
+
+
{{srvModel.info.progressPercentage + srvModel.info.pendingProgressPercentage }}%
+
Of Goal
+
+
+
+ {{srvModel.info.totalContributors}} +
+
Contributors
+
+
+
+ {{endDiff}} +
+
Left
+
+
+
+ {{startDiff}} +
+
Left to start
+
+
+
+ Campaign +
+
not active
+
+
@@ -134,6 +134,21 @@
+
diff --git a/BTCPayServer/Views/AppsPublic/ViewCrowdfund.cshtml b/BTCPayServer/Views/AppsPublic/ViewCrowdfund.cshtml index 8074d3b23..341521569 100644 --- a/BTCPayServer/Views/AppsPublic/ViewCrowdfund.cshtml +++ b/BTCPayServer/Views/AppsPublic/ViewCrowdfund.cshtml @@ -44,8 +44,11 @@ else - - + + if (Model.AnimationsEnabled) + { + + } @await Html.PartialAsync("Crowdfund/VueCrowdfund", Model) } diff --git a/BTCPayServer/wwwroot/crowdfund/app.js b/BTCPayServer/wwwroot/crowdfund/app.js index 06e67aad8..12c764a7a 100644 --- a/BTCPayServer/wwwroot/crowdfund/app.js +++ b/BTCPayServer/wwwroot/crowdfund/app.js @@ -85,6 +85,8 @@ addLoadEvent(function (ev) { mounted: function () { hubListener.connect(); var self = this; + this.sound = this.srvModel.soundsEnabled; + this.animation = this.srvModel.animationsEnabled; eventAggregator.$on("invoice-created", function (invoiceId) { btcpay.setApiUrlPrefix(window.location.origin); btcpay.showInvoice(invoiceId); @@ -94,10 +96,10 @@ addLoadEvent(function (ev) { }); eventAggregator.$on("payment-received", function (amount, cryptoCode, type) { var onChain = type.toLowerCase() === "btclike"; - if(this.srvModel.soundsEnabled) { + if(self.sound) { playRandomQuakeSound(); } - if(this.srvModel.animationsEnabled) { + if(self.animation) { fireworks(); } if(onChain){