From 22996ea21ed07bb2e0f890899b6ed608c32fbd51 Mon Sep 17 00:00:00 2001 From: d11n Date: Fri, 23 Feb 2024 13:42:00 +0100 Subject: [PATCH] UI: Deprecate the custom CSS options (#5735) * UI: Deprecate the custom CSS options As discussed with @pavlenex we are deprecating the custom CSS options for particular entities (payemnt request, pull payment, POS, crowdfund) in favor of the store branding approach. This displays the custom CSS section only if these values are set already. * Add IDs to html element This will allow styling of individual entities. --- .../Crowdfund/Public/ViewCrowdfund.cshtml | 2 +- .../Shared/Crowdfund/UpdateCrowdfund.cshtml | 55 +++++++++-------- .../Shared/PointOfSale/Public/_Layout.cshtml | 2 +- .../PointOfSale/UpdatePointOfSale.cshtml | 49 ++++++++------- .../EditPaymentRequest.cshtml | 59 ++++++++++--------- .../ViewPaymentRequest.cshtml | 2 +- .../UIPullPayment/EditPullPayment.cshtml | 59 ++++++++++--------- .../UIPullPayment/ViewPullPayment.cshtml | 2 +- .../UIStorePullPayments/NewPullPayment.cshtml | 51 ++++++++-------- 9 files changed, 153 insertions(+), 128 deletions(-) diff --git a/BTCPayServer/Views/Shared/Crowdfund/Public/ViewCrowdfund.cshtml b/BTCPayServer/Views/Shared/Crowdfund/Public/ViewCrowdfund.cshtml index d6ecc9b55..08004cb83 100644 --- a/BTCPayServer/Views/Shared/Crowdfund/Public/ViewCrowdfund.cshtml +++ b/BTCPayServer/Views/Shared/Crowdfund/Public/ViewCrowdfund.cshtml @@ -14,7 +14,7 @@ } } - + diff --git a/BTCPayServer/Views/Shared/Crowdfund/UpdateCrowdfund.cshtml b/BTCPayServer/Views/Shared/Crowdfund/UpdateCrowdfund.cshtml index 7760e7dc3..73c2465f5 100644 --- a/BTCPayServer/Views/Shared/Crowdfund/UpdateCrowdfund.cshtml +++ b/BTCPayServer/Views/Shared/Crowdfund/UpdateCrowdfund.cshtml @@ -293,31 +293,6 @@ -
-

- -

-
-
-
- - - - - - -
-
- - - -
-
-
-

+ @* We are deprecating the custom CSS options in favor of the store branding approach. + Display this section only if these values are set. *@ + @if (!string.IsNullOrWhiteSpace(Model.CustomCSSLink) || !string.IsNullOrWhiteSpace(Model.EmbeddedCSS)) + { +
+

+ +

+
+
+
+ + + + + + +
+
+ + + +
+
+
+
+ } diff --git a/BTCPayServer/Views/Shared/PointOfSale/Public/_Layout.cshtml b/BTCPayServer/Views/Shared/PointOfSale/Public/_Layout.cshtml index b65940d1e..391b5f7e0 100644 --- a/BTCPayServer/Views/Shared/PointOfSale/Public/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/PointOfSale/Public/_Layout.cshtml @@ -33,7 +33,7 @@ } } - + diff --git a/BTCPayServer/Views/Shared/PointOfSale/UpdatePointOfSale.cshtml b/BTCPayServer/Views/Shared/PointOfSale/UpdatePointOfSale.cshtml index 68e2f324b..0cb77564d 100644 --- a/BTCPayServer/Views/Shared/PointOfSale/UpdatePointOfSale.cshtml +++ b/BTCPayServer/Views/Shared/PointOfSale/UpdatePointOfSale.cshtml @@ -266,31 +266,36 @@ -
-

- -

-
-
-
- - - - - - -
-
- - - + @* We are deprecating the custom CSS options in favor of the store branding approach. + Display this section only if these values are set. *@ + @if (!string.IsNullOrWhiteSpace(Model.CustomCSSLink) || !string.IsNullOrWhiteSpace(Model.EmbeddedCSS)) + { +
+

+ +

+
+
+
+ + + + + + +
+
+ + + +
-
+ }
diff --git a/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml b/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml index d1d65f0f0..4df02098a 100644 --- a/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml +++ b/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml @@ -124,32 +124,37 @@ -
-
-

Additional Options

-
-
-
-

- -

-
-
-
- - - - - - -
-
- - - + @* We are deprecating the custom CSS options in favor of the store branding approach. + Display this section only if these values are set. *@ + @if (!string.IsNullOrWhiteSpace(Model.CustomCSSLink) || !string.IsNullOrWhiteSpace(Model.EmbeddedCSS)) + { +
+
+

Additional Options

+
+
+
+

+ +

+
+
+
+ + + + + + +
+
+ + + +
@@ -157,7 +162,7 @@
-
+ } @if (!string.IsNullOrEmpty(Model.Id)) diff --git a/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml b/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml index 8d9d994b3..64c610278 100644 --- a/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml +++ b/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml @@ -32,7 +32,7 @@ } - + diff --git a/BTCPayServer/Views/UIPullPayment/EditPullPayment.cshtml b/BTCPayServer/Views/UIPullPayment/EditPullPayment.cshtml index c116a55da..9f546a20b 100644 --- a/BTCPayServer/Views/UIPullPayment/EditPullPayment.cshtml +++ b/BTCPayServer/Views/UIPullPayment/EditPullPayment.cshtml @@ -54,32 +54,37 @@
-
-
-

Additional Options

-
-
-
-

- -

-
-
-
- - - - - - -
-
- - - + @* We are deprecating the custom CSS options in favor of the store branding approach. + Display this section only if these values are set. *@ + @if (!string.IsNullOrWhiteSpace(Model.CustomCSSLink) || !string.IsNullOrWhiteSpace(Model.EmbeddedCSS)) + { +
+
+

Additional Options

+
+
+
+

+ +

+
+
+
+ + + + + + +
+
+ + + +
@@ -87,5 +92,5 @@
-
+ } diff --git a/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml b/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml index 9995e8378..5798157e4 100644 --- a/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml +++ b/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml @@ -25,7 +25,7 @@ ViewData.SetBlazorAllowed(false); } - + diff --git a/BTCPayServer/Views/UIStorePullPayments/NewPullPayment.cshtml b/BTCPayServer/Views/UIStorePullPayments/NewPullPayment.cshtml index 93bf72a96..bba4b9b3a 100644 --- a/BTCPayServer/Views/UIStorePullPayments/NewPullPayment.cshtml +++ b/BTCPayServer/Views/UIStorePullPayments/NewPullPayment.cshtml @@ -74,11 +74,36 @@

Additional Options

+
+

+ +

+
+
+
+ +
+ + days +
+ +
+
+
+
+
+ @* We are deprecating the custom CSS options in favor of the store branding approach. + Display this section only if these values are set. *@ + @if (!string.IsNullOrWhiteSpace(Model.CustomCSSLink) || !string.IsNullOrWhiteSpace(Model.EmbeddedCSS)) + {

@@ -88,7 +113,7 @@ - +
@@ -99,27 +124,7 @@
-
-

- -

-
-
-
- -
- - days -
- -
-
-
-
-
+ }