From 6fbcc9a2440c73eb969efc1dde901106a91f6f4b Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Fri, 22 Jul 2022 13:30:39 +0200 Subject: [PATCH] Fix Crowdfund + additional issues (#3994) * Show free when invoice is fixed and 0 amount in apps * animations on crowdfund not enabled broke JS * Perk expansion in crowdfund was broken --- .../UIAppsPublic/PointOfSale/Static.cshtml | 23 +++++++++---- .../Views/UIAppsPublic/ViewCrowdfund.cshtml | 33 +++++++++++-------- BTCPayServer/wwwroot/crowdfund/app.js | 4 ++- .../wwwroot/crowdfund/services/fireworks.js | 2 +- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/BTCPayServer/Views/UIAppsPublic/PointOfSale/Static.cshtml b/BTCPayServer/Views/UIAppsPublic/PointOfSale/Static.cshtml index 7882d96de..9c51d8d07 100644 --- a/BTCPayServer/Views/UIAppsPublic/PointOfSale/Static.cshtml +++ b/BTCPayServer/Views/UIAppsPublic/PointOfSale/Static.cshtml @@ -94,12 +94,23 @@ @functions { private void PayFormInputContent(string buttonText,ViewPointOfSaleViewModel.Item.ItemPrice.ItemPriceType itemPriceType, decimal? minPriceValue = null, decimal? priceValue = null) { -
- @Model.CurrencySymbol - - - -
+ if (itemPriceType == ViewPointOfSaleViewModel.Item.ItemPrice.ItemPriceType.Fixed && priceValue == 0) + { +
+ + +
+ } + else + { +
+ @Model.CurrencySymbol + + + +
+ } + } private void CardBody(string title, string description) diff --git a/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml b/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml index 095665f50..64d4bed8f 100644 --- a/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml +++ b/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml @@ -337,7 +337,10 @@ {{targetCurrency}} - + + @@ -346,19 +349,21 @@

-
- - {{targetCurrency}} +
+