From 2e6246e385fccf606ecd3171644f8410b3ec61e2 Mon Sep 17 00:00:00 2001 From: d11n Date: Fri, 22 Jul 2022 14:58:25 +0200 Subject: [PATCH] Move TagHelpers to Abstractions (#3975) * Move TagHelpers to Abstractions Makes them available for use in plugins. Also cleans up the tag helper references in the view code: As we have it in the root view imports, the individual directives in the views are superfluous. * Move CurrenciesSuggestionsTagHelper back To get rid of the Rating dependency in Abstractions. --- .../TagHelpers/CSPA.cs | 3 ++- .../TagHelpers/CSPEventTagHelper.cs | 2 +- .../TagHelpers/CSPInlineScriptTagHelper.cs | 2 +- .../TagHelpers/CSPTemplate.cs | 3 ++- .../TagHelpers/PermissionTagHelper.cs | 2 +- .../TagHelpers/SVGUse.cs | 3 +-- .../TagHelpers/SrvModel.cs | 4 ++-- BTCPayServer/Components/AppSales/Default.cshtml | 2 -- BTCPayServer/Components/MainNav/Default.cshtml | 8 +------- BTCPayServer/Components/Notifications/Dropdown.cshtml | 1 - BTCPayServer/Components/Notifications/List.cshtml | 1 - BTCPayServer/Components/Notifications/Recent.cshtml | 2 -- .../Components/StoreLightningBalance/Default.cshtml | 2 -- .../Components/StoreLightningServices/Default.cshtml | 1 - BTCPayServer/Components/StoreSelector/Default.cshtml | 1 - BTCPayServer/Components/WalletNav/Default.cshtml | 2 -- BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs | 6 +++--- BTCPayServer/Views/Shared/LayoutFoot.cshtml | 4 +--- BTCPayServer/Views/Shared/LayoutHead.cshtml | 1 - BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml | 1 - BTCPayServer/Views/Shared/PayButton/Enable.cshtml | 1 - BTCPayServer/Views/Shared/PayButton/NavExtension.cshtml | 2 -- BTCPayServer/Views/Shared/PayButton/PayButton.cshtml | 2 -- BTCPayServer/Views/Shared/PayButton/_ViewImports.cshtml | 1 - BTCPayServer/Views/Shared/_Layout.cshtml | 2 -- BTCPayServer/Views/Shared/_LayoutPos.cshtml | 2 -- .../Views/Shared/_ValidationScriptsPartial.cshtml | 2 -- BTCPayServer/Views/UIAccount/_ViewImports.cshtml | 1 - BTCPayServer/Views/UIApps/UpdateCrowdfund.cshtml | 1 - BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml | 1 - BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml | 1 - .../UICustodianAccounts/CreateCustodianAccount.cshtml | 1 - .../Views/UICustodianAccounts/EditCustodianAccount.cshtml | 1 - .../Views/UICustodianAccounts/ViewCustodianAccount.cshtml | 1 - BTCPayServer/Views/UIInvoice/Checkout.cshtml | 3 --- BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml | 2 -- .../Views/UIPaymentRequest/EditPaymentRequest.cshtml | 1 - .../Views/UIPaymentRequest/ViewPaymentRequest.cshtml | 6 ------ .../ShowLightningNodeInfo.cshtml | 5 ----- BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml | 4 ---- BTCPayServer/Views/UIStores/Dashboard.cshtml | 2 -- BTCPayServer/Views/UIStores/GenerateWallet.cshtml | 1 - BTCPayServer/Views/UIStores/GenerateWalletOptions.cshtml | 1 - .../Views/UIStores/ImportWallet/ConfirmAddresses.cshtml | 1 - BTCPayServer/Views/UIStores/ImportWallet/File.cshtml | 1 - BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml | 1 - BTCPayServer/Views/UIStores/ImportWallet/Scan.cshtml | 1 - BTCPayServer/Views/UIStores/ImportWallet/Seed.cshtml | 1 - BTCPayServer/Views/UIStores/ImportWallet/Xpub.cshtml | 1 - BTCPayServer/Views/UIStores/ImportWalletOptions.cshtml | 1 - BTCPayServer/Views/UIWallets/SignWithSeed.cshtml | 1 - BTCPayServer/Views/UIWallets/WalletPSBT.cshtml | 6 +----- BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml | 1 - BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml | 4 ---- BTCPayServer/Views/UIWallets/WalletReceive.cshtml | 4 +--- BTCPayServer/Views/UIWallets/WalletSend.cshtml | 4 ---- BTCPayServer/Views/UIWallets/WalletSendVault.cshtml | 2 -- BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml | 2 -- BTCPayServer/Views/UIWallets/_ViewImports.cshtml | 1 - BTCPayServer/_ViewImports.cshtml | 1 + 60 files changed, 18 insertions(+), 110 deletions(-) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/CSPA.cs (94%) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/CSPEventTagHelper.cs (96%) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/CSPInlineScriptTagHelper.cs (95%) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/CSPTemplate.cs (93%) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/PermissionTagHelper.cs (97%) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/SVGUse.cs (92%) rename {BTCPayServer => BTCPayServer.Abstractions}/TagHelpers/SrvModel.cs (94%) diff --git a/BTCPayServer/TagHelpers/CSPA.cs b/BTCPayServer.Abstractions/TagHelpers/CSPA.cs similarity index 94% rename from BTCPayServer/TagHelpers/CSPA.cs rename to BTCPayServer.Abstractions/TagHelpers/CSPA.cs index 3f8d6b097..e1e40d73d 100644 --- a/BTCPayServer/TagHelpers/CSPA.cs +++ b/BTCPayServer.Abstractions/TagHelpers/CSPA.cs @@ -1,7 +1,8 @@ using System; using BTCPayServer.Security; using Microsoft.AspNetCore.Razor.TagHelpers; -namespace BTCPayServer.TagHelpers; + +namespace BTCPayServer.Abstractions.TagHelpers; /// /// Add sha256- to allow inline event handlers in a:href=javascript: diff --git a/BTCPayServer/TagHelpers/CSPEventTagHelper.cs b/BTCPayServer.Abstractions/TagHelpers/CSPEventTagHelper.cs similarity index 96% rename from BTCPayServer/TagHelpers/CSPEventTagHelper.cs rename to BTCPayServer.Abstractions/TagHelpers/CSPEventTagHelper.cs index 5eadbda3e..c7842a9f9 100644 --- a/BTCPayServer/TagHelpers/CSPEventTagHelper.cs +++ b/BTCPayServer.Abstractions/TagHelpers/CSPEventTagHelper.cs @@ -2,8 +2,8 @@ using System.Collections.Generic; using System.Linq; using BTCPayServer.Security; using Microsoft.AspNetCore.Razor.TagHelpers; -namespace BTCPayServer.TagHelpers; +namespace BTCPayServer.Abstractions.TagHelpers; /// /// Add 'unsafe-hashes' and sha256- to allow inline event handlers in CSP diff --git a/BTCPayServer/TagHelpers/CSPInlineScriptTagHelper.cs b/BTCPayServer.Abstractions/TagHelpers/CSPInlineScriptTagHelper.cs similarity index 95% rename from BTCPayServer/TagHelpers/CSPInlineScriptTagHelper.cs rename to BTCPayServer.Abstractions/TagHelpers/CSPInlineScriptTagHelper.cs index af6ae5023..0e76563c0 100644 --- a/BTCPayServer/TagHelpers/CSPInlineScriptTagHelper.cs +++ b/BTCPayServer.Abstractions/TagHelpers/CSPInlineScriptTagHelper.cs @@ -1,8 +1,8 @@ using BTCPayServer.Security; using Microsoft.AspNetCore.Razor.TagHelpers; using NBitcoin; -namespace BTCPayServer.TagHelpers; +namespace BTCPayServer.Abstractions.TagHelpers; /// /// Add a nonce-* so the inline-script can pass CSP rule when they are rendered server-side diff --git a/BTCPayServer/TagHelpers/CSPTemplate.cs b/BTCPayServer.Abstractions/TagHelpers/CSPTemplate.cs similarity index 93% rename from BTCPayServer/TagHelpers/CSPTemplate.cs rename to BTCPayServer.Abstractions/TagHelpers/CSPTemplate.cs index 81343cbe5..da1a800ad 100644 --- a/BTCPayServer/TagHelpers/CSPTemplate.cs +++ b/BTCPayServer.Abstractions/TagHelpers/CSPTemplate.cs @@ -1,7 +1,8 @@ using System.Threading.Tasks; using BTCPayServer.Security; using Microsoft.AspNetCore.Razor.TagHelpers; -namespace BTCPayServer.TagHelpers; + +namespace BTCPayServer.Abstractions.TagHelpers; /// /// Add sha256- to allow inline event handlers in CSP diff --git a/BTCPayServer/TagHelpers/PermissionTagHelper.cs b/BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs similarity index 97% rename from BTCPayServer/TagHelpers/PermissionTagHelper.cs rename to BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs index fdc8f387d..bca3900e9 100644 --- a/BTCPayServer/TagHelpers/PermissionTagHelper.cs +++ b/BTCPayServer.Abstractions/TagHelpers/PermissionTagHelper.cs @@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.Extensions.Logging; -namespace BTCPayServer.TagHelpers; +namespace BTCPayServer.Abstractions.TagHelpers; [HtmlTargetElement(Attributes = nameof(Permission))] public class PermissionTagHelper : TagHelper diff --git a/BTCPayServer/TagHelpers/SVGUse.cs b/BTCPayServer.Abstractions/TagHelpers/SVGUse.cs similarity index 92% rename from BTCPayServer/TagHelpers/SVGUse.cs rename to BTCPayServer.Abstractions/TagHelpers/SVGUse.cs index 994e0ce1d..4b3cc2476 100644 --- a/BTCPayServer/TagHelpers/SVGUse.cs +++ b/BTCPayServer.Abstractions/TagHelpers/SVGUse.cs @@ -1,11 +1,10 @@ using System.Text.Encodings.Web; using Microsoft.AspNetCore.Mvc.Razor.TagHelpers; -using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; -namespace BTCPayServer.TagHelpers; +namespace BTCPayServer.Abstractions.TagHelpers; // Make sure that SignInManager @inject PoliciesSettings PoliciesSettings @inject ThemeSettings Theme @model BTCPayServer.Components.MainNav.MainNavViewModel -@addTagHelper *, BundlerMinifier.TagHelpers -
diff --git a/BTCPayServer/Components/Notifications/Dropdown.cshtml b/BTCPayServer/Components/Notifications/Dropdown.cshtml index 1b87016af..5a36919f8 100644 --- a/BTCPayServer/Components/Notifications/Dropdown.cshtml +++ b/BTCPayServer/Components/Notifications/Dropdown.cshtml @@ -1,7 +1,6 @@ @using BTCPayServer.Views.Notifications @using BTCPayServer.Abstractions.Extensions @model BTCPayServer.Components.Notifications.NotificationsViewModel -@addTagHelper *, BundlerMinifier.TagHelpers
@if (Model.UnseenCount > 0) diff --git a/BTCPayServer/Components/Notifications/List.cshtml b/BTCPayServer/Components/Notifications/List.cshtml index 7bdd2ad36..b8dd9c3b9 100644 --- a/BTCPayServer/Components/Notifications/List.cshtml +++ b/BTCPayServer/Components/Notifications/List.cshtml @@ -1,6 +1,5 @@ @using BTCPayServer.Abstractions.Extensions @model BTCPayServer.Components.Notifications.NotificationsViewModel -@addTagHelper *, BundlerMinifier.TagHelpers
@foreach (var n in Model.Last5) diff --git a/BTCPayServer/Components/Notifications/Recent.cshtml b/BTCPayServer/Components/Notifications/Recent.cshtml index d093564f3..507284ae3 100644 --- a/BTCPayServer/Components/Notifications/Recent.cshtml +++ b/BTCPayServer/Components/Notifications/Recent.cshtml @@ -1,8 +1,6 @@ @model BTCPayServer.Components.Notifications.NotificationsViewModel -@addTagHelper *, BundlerMinifier.TagHelpers
- @if (Model.Last5.Any()) {
diff --git a/BTCPayServer/Components/StoreLightningBalance/Default.cshtml b/BTCPayServer/Components/StoreLightningBalance/Default.cshtml index d53a1624a..012e014de 100644 --- a/BTCPayServer/Components/StoreLightningBalance/Default.cshtml +++ b/BTCPayServer/Components/StoreLightningBalance/Default.cshtml @@ -1,5 +1,3 @@ -@using BTCPayServer.Lightning -@using BTCPayServer.TagHelpers @model BTCPayServer.Components.StoreLightningBalance.StoreLightningBalanceViewModel
diff --git a/BTCPayServer/Components/StoreLightningServices/Default.cshtml b/BTCPayServer/Components/StoreLightningServices/Default.cshtml index 3b3770cd1..35ebfde20 100644 --- a/BTCPayServer/Components/StoreLightningServices/Default.cshtml +++ b/BTCPayServer/Components/StoreLightningServices/Default.cshtml @@ -1,4 +1,3 @@ -@using Microsoft.AspNetCore.Mvc.TagHelpers @model BTCPayServer.Components.StoreLightningServices.StoreLightningServicesViewModel @if (Model.Services != null && Model.Services.Any()) diff --git a/BTCPayServer/Components/StoreSelector/Default.cshtml b/BTCPayServer/Components/StoreSelector/Default.cshtml index c3d8bac4a..eb42bde7f 100644 --- a/BTCPayServer/Components/StoreSelector/Default.cshtml +++ b/BTCPayServer/Components/StoreSelector/Default.cshtml @@ -1,7 +1,6 @@ @inject BTCPayServer.Services.BTCPayServerEnvironment _env @inject SignInManager _signInManager @model BTCPayServer.Components.StoreSelector.StoreSelectorViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @functions { @* ReSharper disable once CSharpWarnings::CS1998 *@ #pragma warning disable 1998 diff --git a/BTCPayServer/Components/WalletNav/Default.cshtml b/BTCPayServer/Components/WalletNav/Default.cshtml index 29ebfc770..1bcbac88d 100644 --- a/BTCPayServer/Components/WalletNav/Default.cshtml +++ b/BTCPayServer/Components/WalletNav/Default.cshtml @@ -2,10 +2,8 @@ @using BTCPayServer.Client @using BTCPayServer.Views.Wallets @using BTCPayServer.Abstractions.Extensions -@inject BTCPayNetworkProvider _btcPayNetworkProvider @model BTCPayServer.Components.WalletNav.WalletNavViewModel -@addTagHelper *, BundlerMinifier.TagHelpers
diff --git a/BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs b/BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs index fd65c93dd..9db409355 100644 --- a/BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs +++ b/BTCPayServer/TagHelpers/CurrenciesSuggestionsTagHelper.cs @@ -1,7 +1,7 @@ -using BTCPayServer.Services.Rates; -using System.Linq; -using Microsoft.AspNetCore.Razor.TagHelpers; using System.Collections.Generic; +using System.Linq; +using BTCPayServer.Services.Rates; +using Microsoft.AspNetCore.Razor.TagHelpers; namespace BTCPayServer.TagHelpers { diff --git a/BTCPayServer/Views/Shared/LayoutFoot.cshtml b/BTCPayServer/Views/Shared/LayoutFoot.cshtml index ceead1e7a..0f3cc5063 100644 --- a/BTCPayServer/Views/Shared/LayoutFoot.cshtml +++ b/BTCPayServer/Views/Shared/LayoutFoot.cshtml @@ -1,4 +1,2 @@ -@addTagHelper *, BundlerMinifier.TagHelpers - - + diff --git a/BTCPayServer/Views/Shared/LayoutHead.cshtml b/BTCPayServer/Views/Shared/LayoutHead.cshtml index d3540e85b..78397c865 100644 --- a/BTCPayServer/Views/Shared/LayoutHead.cshtml +++ b/BTCPayServer/Views/Shared/LayoutHead.cshtml @@ -1,5 +1,4 @@ @inject BTCPayServer.Services.PoliciesSettings PoliciesSettings -@addTagHelper *, BundlerMinifier.TagHelpers diff --git a/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml b/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml index a92f1de02..1de3f03a7 100644 --- a/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml +++ b/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml @@ -1,7 +1,6 @@ @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Services @inject ThemeSettings Theme -@addTagHelper *, BundlerMinifier.TagHelpers @if (Theme.CustomTheme) { diff --git a/BTCPayServer/Views/Shared/PayButton/Enable.cshtml b/BTCPayServer/Views/Shared/PayButton/Enable.cshtml index ea120b49d..2c68fe801 100644 --- a/BTCPayServer/Views/Shared/PayButton/Enable.cshtml +++ b/BTCPayServer/Views/Shared/PayButton/Enable.cshtml @@ -1,5 +1,4 @@ @using BTCPayServer.Views.Stores -@using Microsoft.AspNetCore.Mvc.TagHelpers @{ ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().Id); } diff --git a/BTCPayServer/Views/Shared/PayButton/NavExtension.cshtml b/BTCPayServer/Views/Shared/PayButton/NavExtension.cshtml index 11c4dbbc7..ff0b76c6f 100644 --- a/BTCPayServer/Views/Shared/PayButton/NavExtension.cshtml +++ b/BTCPayServer/Views/Shared/PayButton/NavExtension.cshtml @@ -1,7 +1,5 @@ @using BTCPayServer.Client @using BTCPayServer.Views.Stores -@using Microsoft.AspNetCore.Mvc.TagHelpers -@using BTCPayServer.TagHelpers @{ var store = Context.GetStoreData(); } diff --git a/BTCPayServer/Views/Shared/PayButton/PayButton.cshtml b/BTCPayServer/Views/Shared/PayButton/PayButton.cshtml index ffe667586..6e261e972 100644 --- a/BTCPayServer/Views/Shared/PayButton/PayButton.cshtml +++ b/BTCPayServer/Views/Shared/PayButton/PayButton.cshtml @@ -1,7 +1,5 @@ @inject Security.ContentSecurityPolicies csp @using BTCPayServer.Views.Stores -@using Microsoft.AspNetCore.Mvc.TagHelpers -@using BTCPayServer.TagHelpers @model BTCPayServer.Plugins.PayButton.Models.PayButtonViewModel @{ ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/Shared/PayButton/_ViewImports.cshtml b/BTCPayServer/Views/Shared/PayButton/_ViewImports.cshtml index 5576b38b7..ebe810b00 100644 --- a/BTCPayServer/Views/Shared/PayButton/_ViewImports.cshtml +++ b/BTCPayServer/Views/Shared/PayButton/_ViewImports.cshtml @@ -1,4 +1,3 @@ @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Plugins.PayButton.Views @namespace BTCPayServer.Plugins.PayButton.Views -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index 738b1cf7c..e45f5d635 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -1,8 +1,6 @@ @using BTCPayServer.Abstractions.Extensions -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Components.StoreSelector @using BTCPayServer.Components.MainNav -@using BTCPayServer.TagHelpers @inject BTCPayServer.Services.BTCPayServerEnvironment _env @inject SignInManager _signInManager @inject UserManager _userManager diff --git a/BTCPayServer/Views/Shared/_LayoutPos.cshtml b/BTCPayServer/Views/Shared/_LayoutPos.cshtml index 7934e4e60..ff695870c 100644 --- a/BTCPayServer/Views/Shared/_LayoutPos.cshtml +++ b/BTCPayServer/Views/Shared/_LayoutPos.cshtml @@ -1,8 +1,6 @@ -@addTagHelper *, BundlerMinifier.TagHelpers @inject BTCPayServer.Services.ThemeSettings Theme @using BTCPayServer.Services.Apps -@using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Abstractions.Extensions @model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel diff --git a/BTCPayServer/Views/Shared/_ValidationScriptsPartial.cshtml b/BTCPayServer/Views/Shared/_ValidationScriptsPartial.cshtml index d6036f632..dbd9b1a54 100644 --- a/BTCPayServer/Views/Shared/_ValidationScriptsPartial.cshtml +++ b/BTCPayServer/Views/Shared/_ValidationScriptsPartial.cshtml @@ -1,3 +1 @@ -@addTagHelper *, BundlerMinifier.TagHelpers - diff --git a/BTCPayServer/Views/UIAccount/_ViewImports.cshtml b/BTCPayServer/Views/UIAccount/_ViewImports.cshtml index f0c1fba0c..9d7e22dca 100644 --- a/BTCPayServer/Views/UIAccount/_ViewImports.cshtml +++ b/BTCPayServer/Views/UIAccount/_ViewImports.cshtml @@ -1,3 +1,2 @@ @using BTCPayServer.Views.Wallets @using BTCPayServer.Models.WalletViewModels -@addTagHelper *, BundlerMinifier.TagHelpers diff --git a/BTCPayServer/Views/UIApps/UpdateCrowdfund.cshtml b/BTCPayServer/Views/UIApps/UpdateCrowdfund.cshtml index 53b27746f..cf72779cb 100644 --- a/BTCPayServer/Views/UIApps/UpdateCrowdfund.cshtml +++ b/BTCPayServer/Views/UIApps/UpdateCrowdfund.cshtml @@ -1,4 +1,3 @@ -@addTagHelper *, BundlerMinifier.TagHelpers @using System.Globalization @using BTCPayServer.Abstractions.Models @model UpdateCrowdfundViewModel diff --git a/BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml b/BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml index 29cd3553b..975a1f219 100644 --- a/BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml +++ b/BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml @@ -1,6 +1,5 @@ @using BTCPayServer.Services.Apps @using BTCPayServer.Abstractions.Models -@addTagHelper *, BundlerMinifier.TagHelpers @model UpdatePointOfSaleViewModel @{ ViewData.SetActivePage(AppsNavPages.Update, "Update Point of Sale", Model.Id); diff --git a/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml b/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml index 64d4bed8f..b908399ca 100644 --- a/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml +++ b/BTCPayServer/Views/UIAppsPublic/ViewCrowdfund.cshtml @@ -1,5 +1,4 @@ @model BTCPayServer.Models.AppViewModels.ViewCrowdfundViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @inject ISettingsRepository SettingsRepository @using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Models.AppViewModels diff --git a/BTCPayServer/Views/UICustodianAccounts/CreateCustodianAccount.cshtml b/BTCPayServer/Views/UICustodianAccounts/CreateCustodianAccount.cshtml index 141642cd8..b77b03ad7 100644 --- a/BTCPayServer/Views/UICustodianAccounts/CreateCustodianAccount.cshtml +++ b/BTCPayServer/Views/UICustodianAccounts/CreateCustodianAccount.cshtml @@ -1,5 +1,4 @@ @using BTCPayServer.Views.Apps -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Abstractions.Extensions @model BTCPayServer.Models.CustodianAccountViewModels.CreateCustodianAccountViewModel @{ diff --git a/BTCPayServer/Views/UICustodianAccounts/EditCustodianAccount.cshtml b/BTCPayServer/Views/UICustodianAccounts/EditCustodianAccount.cshtml index 0e335e0bd..f2c0f0649 100644 --- a/BTCPayServer/Views/UICustodianAccounts/EditCustodianAccount.cshtml +++ b/BTCPayServer/Views/UICustodianAccounts/EditCustodianAccount.cshtml @@ -1,5 +1,4 @@ @using BTCPayServer.Views.Apps -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Abstractions.Extensions @model BTCPayServer.Models.CustodianAccountViewModels.EditCustodianAccountViewModel @{ diff --git a/BTCPayServer/Views/UICustodianAccounts/ViewCustodianAccount.cshtml b/BTCPayServer/Views/UICustodianAccounts/ViewCustodianAccount.cshtml index 2113892c5..6351a7183 100644 --- a/BTCPayServer/Views/UICustodianAccounts/ViewCustodianAccount.cshtml +++ b/BTCPayServer/Views/UICustodianAccounts/ViewCustodianAccount.cshtml @@ -1,5 +1,4 @@ @using BTCPayServer.Views.Apps -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Custodians @model BTCPayServer.Models.CustodianAccountViewModels.ViewCustodianAccountViewModel diff --git a/BTCPayServer/Views/UIInvoice/Checkout.cshtml b/BTCPayServer/Views/UIInvoice/Checkout.cshtml index 626cd97f0..e3db43bd7 100644 --- a/BTCPayServer/Views/UIInvoice/Checkout.cshtml +++ b/BTCPayServer/Views/UIInvoice/Checkout.cshtml @@ -1,9 +1,6 @@ -@addTagHelper *, BundlerMinifier.TagHelpers @inject BTCPayServer.Services.LanguageService langService -@inject BTCPayNetworkProvider BTCPayNetworkProvider @inject BTCPayServer.Services.BTCPayServerEnvironment env @inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary -@using NBitcoin @model PaymentModel @{ Layout = null; diff --git a/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml b/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml index 835a8434d..d4d4713de 100644 --- a/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml +++ b/BTCPayServer/Views/UIInvoice/InvoiceReceipt.cshtml @@ -2,8 +2,6 @@ @using BTCPayServer.Client @using BTCPayServer.Client.Models @using BTCPayServer.Services.Rates -@using BTCPayServer.TagHelpers -@using Microsoft.AspNetCore.Mvc.TagHelpers @inject BTCPayServer.Services.BTCPayServerEnvironment env @inject BTCPayServer.Services.ThemeSettings Theme @inject CurrencyNameTable CurrencyNameTable diff --git a/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml b/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml index 445f6697f..41766f248 100644 --- a/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml +++ b/BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml @@ -1,7 +1,6 @@ @using BTCPayServer.Services.PaymentRequests @using System.Globalization @model BTCPayServer.Models.PaymentRequestViewModels.UpdatePaymentRequestViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ ViewData.SetActivePage(PaymentRequestsNavPages.Create, $"{(string.IsNullOrEmpty(Model.Id) ? "Create" : "Edit")} Payment Request", Model.Id); } diff --git a/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml b/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml index 624981990..a851771af 100644 --- a/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml +++ b/BTCPayServer/Views/UIPaymentRequest/ViewPaymentRequest.cshtml @@ -1,15 +1,9 @@ @using BTCPayServer.Services.Invoices @using BTCPayServer.Client.Models -@using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Client @using BTCPayServer.Components.ThemeSwitch -@using BTCPayServer.TagHelpers -@using BundlerMinifier.TagHelpers -@using Microsoft.AspNetCore.Mvc.TagHelpers @model BTCPayServer.Models.PaymentRequestViewModels.ViewPaymentRequestViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @inject BTCPayServer.Services.BTCPayServerEnvironment env -@inject ISettingsRepository _settingsRepository @inject BTCPayServer.Services.ThemeSettings Theme @{ ViewData["Title"] = Model.Title; diff --git a/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml b/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml index 276e4940c..373ba1788 100644 --- a/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml +++ b/BTCPayServer/Views/UIPublicLightningNodeInfo/ShowLightningNodeInfo.cshtml @@ -1,9 +1,4 @@ -@addTagHelper *, BundlerMinifier.TagHelpers -@inject ISettingsRepository _settingsRepository - -@using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Abstractions.Extensions -@using BTCPayServer.Lightning @model BTCPayServer.Controllers.ShowLightningNodeInfoViewModel @inject BTCPayServer.Services.ThemeSettings Theme @{ diff --git a/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml b/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml index 7feccbfa7..e2f5df00c 100644 --- a/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml +++ b/BTCPayServer/Views/UIPullPayment/ViewPullPayment.cshtml @@ -5,12 +5,8 @@ @using BTCPayServer.Client @using BTCPayServer.Components.ThemeSwitch @using BTCPayServer.Payments -@using Microsoft.AspNetCore.Mvc.TagHelpers -@using BundlerMinifier.TagHelpers -@using BTCPayServer.TagHelpers @model BTCPayServer.Models.ViewPullPaymentModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ ViewData["Title"] = Model.Title; Layout = null; diff --git a/BTCPayServer/Views/UIStores/Dashboard.cshtml b/BTCPayServer/Views/UIStores/Dashboard.cshtml index b28925559..96cf35046 100644 --- a/BTCPayServer/Views/UIStores/Dashboard.cshtml +++ b/BTCPayServer/Views/UIStores/Dashboard.cshtml @@ -4,8 +4,6 @@ @using BTCPayServer.Components.StoreRecentInvoices @using BTCPayServer.Components.StoreRecentTransactions @using BTCPayServer.Components.StoreWalletBalance -@using BTCPayServer.TagHelpers -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Components.AppSales @using BTCPayServer.Components.AppTopItems @model StoreDashboardViewModel; diff --git a/BTCPayServer/Views/UIStores/GenerateWallet.cshtml b/BTCPayServer/Views/UIStores/GenerateWallet.cshtml index 23a74ebd5..e502f943e 100644 --- a/BTCPayServer/Views/UIStores/GenerateWallet.cshtml +++ b/BTCPayServer/Views/UIStores/GenerateWallet.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ var isHotWallet = Model.Method == WalletSetupMethod.HotWallet; var type = isHotWallet ? "Hot" : "Watch-Only"; diff --git a/BTCPayServer/Views/UIStores/GenerateWalletOptions.cshtml b/BTCPayServer/Views/UIStores/GenerateWalletOptions.cshtml index 20fbed98b..771d573e3 100644 --- a/BTCPayServer/Views/UIStores/GenerateWalletOptions.cshtml +++ b/BTCPayServer/Views/UIStores/GenerateWalletOptions.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, $"Generate {Model.CryptoCode} Wallet", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWallet/ConfirmAddresses.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/ConfirmAddresses.cshtml index afd6a73c4..a65d740bf 100644 --- a/BTCPayServer/Views/UIStores/ImportWallet/ConfirmAddresses.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWallet/ConfirmAddresses.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Confirm addresses", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWallet/File.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/File.cshtml index 3e5fcaa1f..7e58b1499 100644 --- a/BTCPayServer/Views/UIStores/ImportWallet/File.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWallet/File.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Import your wallet file", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml index b014e18d2..9417ae2ec 100644 --- a/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWallet/Hardware.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Connect your hardware wallet", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWallet/Scan.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/Scan.cshtml index c1a85c68c..ec88b26f1 100644 --- a/BTCPayServer/Views/UIStores/ImportWallet/Scan.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWallet/Scan.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Scan QR code", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWallet/Seed.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/Seed.cshtml index f4efe3586..ef59a31bb 100644 --- a/BTCPayServer/Views/UIStores/ImportWallet/Seed.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWallet/Seed.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter the wallet seed", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWallet/Xpub.cshtml b/BTCPayServer/Views/UIStores/ImportWallet/Xpub.cshtml index 642ecdf97..482ecd912 100644 --- a/BTCPayServer/Views/UIStores/ImportWallet/Xpub.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWallet/Xpub.cshtml @@ -1,5 +1,4 @@ @model WalletSetupViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter your extended public key", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIStores/ImportWalletOptions.cshtml b/BTCPayServer/Views/UIStores/ImportWalletOptions.cshtml index d1c5cfacf..59af1a4ed 100644 --- a/BTCPayServer/Views/UIStores/ImportWalletOptions.cshtml +++ b/BTCPayServer/Views/UIStores/ImportWalletOptions.cshtml @@ -1,6 +1,5 @@ @model WalletSetupViewModel @inject BTCPayNetworkProvider BTCPayNetworkProvider -@addTagHelper *, BundlerMinifier.TagHelpers @{ Layout = "_LayoutWalletSetup"; ViewData.SetActivePage(StoreNavPages.OnchainSettings, $"Import {Model.CryptoCode} Wallet", Context.GetStoreData().Id); diff --git a/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml b/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml index 890ecd76b..e68d8c2df 100644 --- a/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml +++ b/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml @@ -1,5 +1,4 @@ @using BTCPayServer.Controllers -@using Microsoft.AspNetCore.Mvc.TagHelpers @model SignWithSeedViewModel @{ var walletId = Context.GetRouteValue("walletId").ToString(); diff --git a/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml index f91cdfd98..06681ed31 100644 --- a/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml @@ -1,9 +1,5 @@ -@using Microsoft.AspNetCore.Mvc.TagHelpers -@using BTCPayServer.Controllers -@using BTCPayServer.TagHelpers -@using BundlerMinifier.TagHelpers +@using BTCPayServer.Controllers @model WalletPSBTViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ var walletId = Context.GetRouteValue("walletId").ToString(); var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId }); diff --git a/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml index 1bcd51135..9e66b1fab 100644 --- a/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml @@ -1,5 +1,4 @@ @using BTCPayServer.Controllers -@using Microsoft.AspNetCore.Mvc.TagHelpers @model WalletPSBTCombineViewModel @{ var walletId = Context.GetRouteValue("walletId").ToString(); diff --git a/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml index 337d235f2..60fe40dc4 100644 --- a/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml @@ -1,9 +1,5 @@ @using BTCPayServer.Controllers -@using BTCPayServer.TagHelpers -@using Microsoft.AspNetCore.Mvc.TagHelpers -@using BundlerMinifier.TagHelpers @model WalletPSBTViewModel -@addTagHelper *, BundlerMinifier.TagHelpers @{ var walletId = Context.GetRouteValue("walletId").ToString(); var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId }); diff --git a/BTCPayServer/Views/UIWallets/WalletReceive.cshtml b/BTCPayServer/Views/UIWallets/WalletReceive.cshtml index ff8f67772..8841e4713 100644 --- a/BTCPayServer/Views/UIWallets/WalletReceive.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletReceive.cshtml @@ -1,7 +1,5 @@ -@addTagHelper *, BundlerMinifier.TagHelpers -@inject BTCPayServer.Services.BTCPayServerEnvironment env +@inject BTCPayServer.Services.BTCPayServerEnvironment env @using BTCPayServer.Controllers -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Components.QRCode @model BTCPayServer.Controllers.WalletReceiveViewModel @{ diff --git a/BTCPayServer/Views/UIWallets/WalletSend.cshtml b/BTCPayServer/Views/UIWallets/WalletSend.cshtml index bc4dbaa60..2546ac27a 100644 --- a/BTCPayServer/Views/UIWallets/WalletSend.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletSend.cshtml @@ -1,9 +1,5 @@ -@addTagHelper *, BundlerMinifier.TagHelpers @inject BTCPayServer.Security.ContentSecurityPolicies csp @using Microsoft.AspNetCore.Mvc.ModelBinding -@using Microsoft.AspNetCore.Mvc.TagHelpers -@using BTCPayServer.TagHelpers -@using BundlerMinifier.TagHelpers @using BTCPayServer.Controllers @model WalletSendModel @{ diff --git a/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml b/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml index 4700a6635..effe655e2 100644 --- a/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml @@ -1,6 +1,4 @@ @using BTCPayServer.Controllers -@using BTCPayServer.TagHelpers -@using Microsoft.AspNetCore.Mvc.TagHelpers @model WalletSendVaultModel @{ var walletId = Context.GetRouteValue("walletId").ToString(); diff --git a/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml b/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml index 3d5e483ab..0e2bae871 100644 --- a/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml @@ -1,8 +1,6 @@ @using BTCPayServer.Controllers -@using Microsoft.AspNetCore.Mvc.TagHelpers @model WalletSigningOptionsModel @inject BTCPayNetworkProvider BTCPayNetworkProvider -@addTagHelper *, BundlerMinifier.TagHelpers @{ var walletId = WalletId.Parse(Context.GetRouteValue("walletId").ToString()); var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId }); diff --git a/BTCPayServer/Views/UIWallets/_ViewImports.cshtml b/BTCPayServer/Views/UIWallets/_ViewImports.cshtml index 93e8cb4dc..423b282e7 100644 --- a/BTCPayServer/Views/UIWallets/_ViewImports.cshtml +++ b/BTCPayServer/Views/UIWallets/_ViewImports.cshtml @@ -1,4 +1,3 @@ @using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Views.Wallets @using BTCPayServer.Models.WalletViewModels -@addTagHelper *, BundlerMinifier.TagHelpers diff --git a/BTCPayServer/_ViewImports.cshtml b/BTCPayServer/_ViewImports.cshtml index d01ea8212..b48ea3df0 100644 --- a/BTCPayServer/_ViewImports.cshtml +++ b/BTCPayServer/_ViewImports.cshtml @@ -12,4 +12,5 @@ @inject Safe Safe @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, BTCPayServer +@addTagHelper *, BTCPayServer.Abstractions @addTagHelper *, BundlerMinifier.TagHelpers