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.
This commit is contained in:
d11n 2022-07-22 14:58:25 +02:00 committed by GitHub
parent a9a0bf01ad
commit 2e6246e385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 18 additions and 110 deletions

View file

@ -1,7 +1,8 @@
using System; using System;
using BTCPayServer.Security; using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary> /// <summary>
/// Add sha256- to allow inline event handlers in a:href=javascript: /// Add sha256- to allow inline event handlers in a:href=javascript:

View file

@ -2,8 +2,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using BTCPayServer.Security; using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary> /// <summary>
/// Add 'unsafe-hashes' and sha256- to allow inline event handlers in CSP /// Add 'unsafe-hashes' and sha256- to allow inline event handlers in CSP

View file

@ -1,8 +1,8 @@
using BTCPayServer.Security; using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
using NBitcoin; using NBitcoin;
namespace BTCPayServer.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary> /// <summary>
/// Add a nonce-* so the inline-script can pass CSP rule when they are rendered server-side /// Add a nonce-* so the inline-script can pass CSP rule when they are rendered server-side

View file

@ -1,7 +1,8 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using BTCPayServer.Security; using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary> /// <summary>
/// Add sha256- to allow inline event handlers in CSP /// Add sha256- to allow inline event handlers in CSP

View file

@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
namespace BTCPayServer.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
[HtmlTargetElement(Attributes = nameof(Permission))] [HtmlTargetElement(Attributes = nameof(Permission))]
public class PermissionTagHelper : TagHelper public class PermissionTagHelper : TagHelper

View file

@ -1,11 +1,10 @@
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers; using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.TagHelpers; namespace BTCPayServer.Abstractions.TagHelpers;
// Make sure that <svg><use href=/ are correctly working if rootpath is present // Make sure that <svg><use href=/ are correctly working if rootpath is present
[HtmlTargetElement("use", Attributes = "href")] [HtmlTargetElement("use", Attributes = "href")]

View file

@ -1,9 +1,9 @@
using BTCPayServer.Abstractions.Services; using BTCPayServer.Abstractions.Services;
using BTCPayServer.Security; using BTCPayServer.Security;
using BTCPayServer.Services;
using Microsoft.AspNetCore.Razor.TagHelpers; using Microsoft.AspNetCore.Razor.TagHelpers;
using NBitcoin; using NBitcoin;
namespace BTCPayServer.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
[HtmlTargetElement("srv-model")] [HtmlTargetElement("srv-model")]
public class SrvModel : TagHelper public class SrvModel : TagHelper

View file

@ -1,6 +1,4 @@
@using BTCPayServer.Services.Apps @using BTCPayServer.Services.Apps
@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Components.AppSales @using BTCPayServer.Components.AppSales
@model BTCPayServer.Components.AppSales.AppSalesViewModel @model BTCPayServer.Components.AppSales.AppSalesViewModel

View file

@ -6,24 +6,18 @@
@using BTCPayServer.Views.PaymentRequest @using BTCPayServer.Views.PaymentRequest
@using BTCPayServer.Views.Wallets @using BTCPayServer.Views.Wallets
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Components.Icon @using BTCPayServer.Components.Icon
@using BTCPayServer.Components.ThemeSwitch @using BTCPayServer.Components.ThemeSwitch
@using BTCPayServer.Components.UIExtensionPoint @using BTCPayServer.Components.UIExtensionPoint
@using BTCPayServer.Security
@using BTCPayServer.Services @using BTCPayServer.Services
@using BTCPayServer.TagHelpers
@using BTCPayServer.Views.CustodianAccounts @using BTCPayServer.Views.CustodianAccounts
@using Microsoft.AspNetCore.Mvc.TagHelpers @inject BTCPayServerEnvironment Env
@inject BTCPayServer.Services.BTCPayServerEnvironment Env
@inject SignInManager<ApplicationUser> SignInManager @inject SignInManager<ApplicationUser> SignInManager
@inject PoliciesSettings PoliciesSettings @inject PoliciesSettings PoliciesSettings
@inject ThemeSettings Theme @inject ThemeSettings Theme
@model BTCPayServer.Components.MainNav.MainNavViewModel @model BTCPayServer.Components.MainNav.MainNavViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
<nav id="mainNav" class="d-flex flex-column justify-content-between"> <nav id="mainNav" class="d-flex flex-column justify-content-between">
<div class="accordion px-3 px-lg-4"> <div class="accordion px-3 px-lg-4">

View file

@ -1,7 +1,6 @@
@using BTCPayServer.Views.Notifications @using BTCPayServer.Views.Notifications
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@model BTCPayServer.Components.Notifications.NotificationsViewModel @model BTCPayServer.Components.Notifications.NotificationsViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
<div id="Notifications"> <div id="Notifications">
@if (Model.UnseenCount > 0) @if (Model.UnseenCount > 0)

View file

@ -1,6 +1,5 @@
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@model BTCPayServer.Components.Notifications.NotificationsViewModel @model BTCPayServer.Components.Notifications.NotificationsViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
<div id="NotificationsList"> <div id="NotificationsList">
@foreach (var n in Model.Last5) @foreach (var n in Model.Last5)

View file

@ -1,8 +1,6 @@
@model BTCPayServer.Components.Notifications.NotificationsViewModel @model BTCPayServer.Components.Notifications.NotificationsViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
<div id="NotificationsRecent"> <div id="NotificationsRecent">
@if (Model.Last5.Any()) @if (Model.Last5.Any())
{ {
<div class="d-flex align-items-center justify-content-between mb-3"> <div class="d-flex align-items-center justify-content-between mb-3">

View file

@ -1,5 +1,3 @@
@using BTCPayServer.Lightning
@using BTCPayServer.TagHelpers
@model BTCPayServer.Components.StoreLightningBalance.StoreLightningBalanceViewModel @model BTCPayServer.Components.StoreLightningBalance.StoreLightningBalanceViewModel
<div id="StoreLightningBalance-@Model.Store.Id" class="widget store-lightning-balance"> <div id="StoreLightningBalance-@Model.Store.Id" class="widget store-lightning-balance">

View file

@ -1,4 +1,3 @@
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.Components.StoreLightningServices.StoreLightningServicesViewModel @model BTCPayServer.Components.StoreLightningServices.StoreLightningServicesViewModel
@if (Model.Services != null && Model.Services.Any()) @if (Model.Services != null && Model.Services.Any())

View file

@ -1,7 +1,6 @@
@inject BTCPayServer.Services.BTCPayServerEnvironment _env @inject BTCPayServer.Services.BTCPayServerEnvironment _env
@inject SignInManager<ApplicationUser> _signInManager @inject SignInManager<ApplicationUser> _signInManager
@model BTCPayServer.Components.StoreSelector.StoreSelectorViewModel @model BTCPayServer.Components.StoreSelector.StoreSelectorViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@functions { @functions {
@* ReSharper disable once CSharpWarnings::CS1998 *@ @* ReSharper disable once CSharpWarnings::CS1998 *@
#pragma warning disable 1998 #pragma warning disable 1998

View file

@ -2,10 +2,8 @@
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Views.Wallets @using BTCPayServer.Views.Wallets
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@inject BTCPayNetworkProvider _btcPayNetworkProvider
@model BTCPayServer.Components.WalletNav.WalletNavViewModel @model BTCPayServer.Components.WalletNav.WalletNavViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
<div class="d-sm-flex align-items-center justify-content-between"> <div class="d-sm-flex align-items-center justify-content-between">
<a asp-controller="UIWallets" asp-action="WalletTransactions" asp-route-walletId="@Model.WalletId" class="unobtrusive-link"> <a asp-controller="UIWallets" asp-action="WalletTransactions" asp-route-walletId="@Model.WalletId" class="unobtrusive-link">

View file

@ -1,7 +1,7 @@
using BTCPayServer.Services.Rates;
using System.Linq;
using Microsoft.AspNetCore.Razor.TagHelpers;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Services.Rates;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.TagHelpers namespace BTCPayServer.TagHelpers
{ {

View file

@ -1,4 +1,2 @@
@addTagHelper *, BundlerMinifier.TagHelpers <bundle name="wwwroot/bundles/bootstrap-bundle.min.js" asp-append-version="true" />
<bundle name="wwwroot/bundles/bootstrap-bundle.min.js" asp-append-version="true" />
<bundle name="wwwroot/bundles/main-bundle.min.js" asp-append-version="true" /> <bundle name="wwwroot/bundles/main-bundle.min.js" asp-append-version="true" />

View file

@ -1,5 +1,4 @@
@inject BTCPayServer.Services.PoliciesSettings PoliciesSettings @inject BTCPayServer.Services.PoliciesSettings PoliciesSettings
@addTagHelper *, BundlerMinifier.TagHelpers
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="~/favicon.ico" type="image/x-icon"> <link rel="icon" href="~/favicon.ico" type="image/x-icon">

View file

@ -1,7 +1,6 @@
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Services @using BTCPayServer.Services
@inject ThemeSettings Theme @inject ThemeSettings Theme
@addTagHelper *, BundlerMinifier.TagHelpers
@if (Theme.CustomTheme) @if (Theme.CustomTheme)
{ {

View file

@ -1,5 +1,4 @@
@using BTCPayServer.Views.Stores @using BTCPayServer.Views.Stores
@using Microsoft.AspNetCore.Mvc.TagHelpers
@{ @{
ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().Id);
} }

View file

@ -1,7 +1,5 @@
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Views.Stores @using BTCPayServer.Views.Stores
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.TagHelpers
@{ var store = Context.GetStoreData(); } @{ var store = Context.GetStoreData(); }

View file

@ -1,7 +1,5 @@
@inject Security.ContentSecurityPolicies csp @inject Security.ContentSecurityPolicies csp
@using BTCPayServer.Views.Stores @using BTCPayServer.Views.Stores
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.TagHelpers
@model BTCPayServer.Plugins.PayButton.Models.PayButtonViewModel @model BTCPayServer.Plugins.PayButton.Models.PayButtonViewModel
@{ @{
ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().Id);

View file

@ -1,4 +1,3 @@
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Plugins.PayButton.Views @using BTCPayServer.Plugins.PayButton.Views
@namespace BTCPayServer.Plugins.PayButton.Views @namespace BTCPayServer.Plugins.PayButton.Views
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View file

@ -1,8 +1,6 @@
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Components.StoreSelector @using BTCPayServer.Components.StoreSelector
@using BTCPayServer.Components.MainNav @using BTCPayServer.Components.MainNav
@using BTCPayServer.TagHelpers
@inject BTCPayServer.Services.BTCPayServerEnvironment _env @inject BTCPayServer.Services.BTCPayServerEnvironment _env
@inject SignInManager<ApplicationUser> _signInManager @inject SignInManager<ApplicationUser> _signInManager
@inject UserManager<ApplicationUser> _userManager @inject UserManager<ApplicationUser> _userManager

View file

@ -1,8 +1,6 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@inject BTCPayServer.Services.ThemeSettings Theme @inject BTCPayServer.Services.ThemeSettings Theme
@using BTCPayServer.Services.Apps @using BTCPayServer.Services.Apps
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel @model BTCPayServer.Models.AppViewModels.ViewPointOfSaleViewModel

View file

@ -1,3 +1 @@
@addTagHelper *, BundlerMinifier.TagHelpers
<bundle name="wwwroot/bundles/jqueryvalidate-bundle.min.js" asp-append-version="true" /> <bundle name="wwwroot/bundles/jqueryvalidate-bundle.min.js" asp-append-version="true" />

View file

@ -1,3 +1,2 @@
@using BTCPayServer.Views.Wallets @using BTCPayServer.Views.Wallets
@using BTCPayServer.Models.WalletViewModels @using BTCPayServer.Models.WalletViewModels
@addTagHelper *, BundlerMinifier.TagHelpers

View file

@ -1,4 +1,3 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@using System.Globalization @using System.Globalization
@using BTCPayServer.Abstractions.Models @using BTCPayServer.Abstractions.Models
@model UpdateCrowdfundViewModel @model UpdateCrowdfundViewModel

View file

@ -1,6 +1,5 @@
@using BTCPayServer.Services.Apps @using BTCPayServer.Services.Apps
@using BTCPayServer.Abstractions.Models @using BTCPayServer.Abstractions.Models
@addTagHelper *, BundlerMinifier.TagHelpers
@model UpdatePointOfSaleViewModel @model UpdatePointOfSaleViewModel
@{ @{
ViewData.SetActivePage(AppsNavPages.Update, "Update Point of Sale", Model.Id); ViewData.SetActivePage(AppsNavPages.Update, "Update Point of Sale", Model.Id);

View file

@ -1,5 +1,4 @@
@model BTCPayServer.Models.AppViewModels.ViewCrowdfundViewModel @model BTCPayServer.Models.AppViewModels.ViewCrowdfundViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@inject ISettingsRepository SettingsRepository @inject ISettingsRepository SettingsRepository
@using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Models.AppViewModels @using BTCPayServer.Models.AppViewModels

View file

@ -1,5 +1,4 @@
@using BTCPayServer.Views.Apps @using BTCPayServer.Views.Apps
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@model BTCPayServer.Models.CustodianAccountViewModels.CreateCustodianAccountViewModel @model BTCPayServer.Models.CustodianAccountViewModels.CreateCustodianAccountViewModel
@{ @{

View file

@ -1,5 +1,4 @@
@using BTCPayServer.Views.Apps @using BTCPayServer.Views.Apps
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@model BTCPayServer.Models.CustodianAccountViewModels.EditCustodianAccountViewModel @model BTCPayServer.Models.CustodianAccountViewModels.EditCustodianAccountViewModel
@{ @{

View file

@ -1,5 +1,4 @@
@using BTCPayServer.Views.Apps @using BTCPayServer.Views.Apps
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Abstractions.Custodians @using BTCPayServer.Abstractions.Custodians
@model BTCPayServer.Models.CustodianAccountViewModels.ViewCustodianAccountViewModel @model BTCPayServer.Models.CustodianAccountViewModels.ViewCustodianAccountViewModel

View file

@ -1,9 +1,6 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@inject BTCPayServer.Services.LanguageService langService @inject BTCPayServer.Services.LanguageService langService
@inject BTCPayNetworkProvider BTCPayNetworkProvider
@inject BTCPayServer.Services.BTCPayServerEnvironment env @inject BTCPayServer.Services.BTCPayServerEnvironment env
@inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary @inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary
@using NBitcoin
@model PaymentModel @model PaymentModel
@{ @{
Layout = null; Layout = null;

View file

@ -2,8 +2,6 @@
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Client.Models @using BTCPayServer.Client.Models
@using BTCPayServer.Services.Rates @using BTCPayServer.Services.Rates
@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject BTCPayServer.Services.BTCPayServerEnvironment env @inject BTCPayServer.Services.BTCPayServerEnvironment env
@inject BTCPayServer.Services.ThemeSettings Theme @inject BTCPayServer.Services.ThemeSettings Theme
@inject CurrencyNameTable CurrencyNameTable @inject CurrencyNameTable CurrencyNameTable

View file

@ -1,7 +1,6 @@
@using BTCPayServer.Services.PaymentRequests @using BTCPayServer.Services.PaymentRequests
@using System.Globalization @using System.Globalization
@model BTCPayServer.Models.PaymentRequestViewModels.UpdatePaymentRequestViewModel @model BTCPayServer.Models.PaymentRequestViewModels.UpdatePaymentRequestViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
ViewData.SetActivePage(PaymentRequestsNavPages.Create, $"{(string.IsNullOrEmpty(Model.Id) ? "Create" : "Edit")} Payment Request", Model.Id); ViewData.SetActivePage(PaymentRequestsNavPages.Create, $"{(string.IsNullOrEmpty(Model.Id) ? "Create" : "Edit")} Payment Request", Model.Id);
} }

View file

@ -1,15 +1,9 @@
@using BTCPayServer.Services.Invoices @using BTCPayServer.Services.Invoices
@using BTCPayServer.Client.Models @using BTCPayServer.Client.Models
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Components.ThemeSwitch @using BTCPayServer.Components.ThemeSwitch
@using BTCPayServer.TagHelpers
@using BundlerMinifier.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model BTCPayServer.Models.PaymentRequestViewModels.ViewPaymentRequestViewModel @model BTCPayServer.Models.PaymentRequestViewModels.ViewPaymentRequestViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@inject BTCPayServer.Services.BTCPayServerEnvironment env @inject BTCPayServer.Services.BTCPayServerEnvironment env
@inject ISettingsRepository _settingsRepository
@inject BTCPayServer.Services.ThemeSettings Theme @inject BTCPayServer.Services.ThemeSettings Theme
@{ @{
ViewData["Title"] = Model.Title; ViewData["Title"] = Model.Title;

View file

@ -1,9 +1,4 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@inject ISettingsRepository _settingsRepository
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Lightning
@model BTCPayServer.Controllers.ShowLightningNodeInfoViewModel @model BTCPayServer.Controllers.ShowLightningNodeInfoViewModel
@inject BTCPayServer.Services.ThemeSettings Theme @inject BTCPayServer.Services.ThemeSettings Theme
@{ @{

View file

@ -5,12 +5,8 @@
@using BTCPayServer.Client @using BTCPayServer.Client
@using BTCPayServer.Components.ThemeSwitch @using BTCPayServer.Components.ThemeSwitch
@using BTCPayServer.Payments @using BTCPayServer.Payments
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BundlerMinifier.TagHelpers
@using BTCPayServer.TagHelpers
@model BTCPayServer.Models.ViewPullPaymentModel @model BTCPayServer.Models.ViewPullPaymentModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
ViewData["Title"] = Model.Title; ViewData["Title"] = Model.Title;
Layout = null; Layout = null;

View file

@ -4,8 +4,6 @@
@using BTCPayServer.Components.StoreRecentInvoices @using BTCPayServer.Components.StoreRecentInvoices
@using BTCPayServer.Components.StoreRecentTransactions @using BTCPayServer.Components.StoreRecentTransactions
@using BTCPayServer.Components.StoreWalletBalance @using BTCPayServer.Components.StoreWalletBalance
@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Components.AppSales @using BTCPayServer.Components.AppSales
@using BTCPayServer.Components.AppTopItems @using BTCPayServer.Components.AppTopItems
@model StoreDashboardViewModel; @model StoreDashboardViewModel;

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
var isHotWallet = Model.Method == WalletSetupMethod.HotWallet; var isHotWallet = Model.Method == WalletSetupMethod.HotWallet;
var type = isHotWallet ? "Hot" : "Watch-Only"; var type = isHotWallet ? "Hot" : "Watch-Only";

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, $"Generate {Model.CryptoCode} Wallet", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, $"Generate {Model.CryptoCode} Wallet", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Confirm addresses", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Confirm addresses", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Import your wallet file", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Import your wallet file", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Connect your hardware wallet", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Connect your hardware wallet", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Scan QR code", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Scan QR code", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter the wallet seed", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter the wallet seed", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter your extended public key", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, "Enter your extended public key", Context.GetStoreData().Id);

View file

@ -1,6 +1,5 @@
@model WalletSetupViewModel @model WalletSetupViewModel
@inject BTCPayNetworkProvider BTCPayNetworkProvider @inject BTCPayNetworkProvider BTCPayNetworkProvider
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
Layout = "_LayoutWalletSetup"; Layout = "_LayoutWalletSetup";
ViewData.SetActivePage(StoreNavPages.OnchainSettings, $"Import {Model.CryptoCode} Wallet", Context.GetStoreData().Id); ViewData.SetActivePage(StoreNavPages.OnchainSettings, $"Import {Model.CryptoCode} Wallet", Context.GetStoreData().Id);

View file

@ -1,5 +1,4 @@
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model SignWithSeedViewModel @model SignWithSeedViewModel
@{ @{
var walletId = Context.GetRouteValue("walletId").ToString(); var walletId = Context.GetRouteValue("walletId").ToString();

View file

@ -1,9 +1,5 @@
@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Controllers
@using BTCPayServer.Controllers
@using BTCPayServer.TagHelpers
@using BundlerMinifier.TagHelpers
@model WalletPSBTViewModel @model WalletPSBTViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
var walletId = Context.GetRouteValue("walletId").ToString(); var walletId = Context.GetRouteValue("walletId").ToString();
var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId }); var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId });

View file

@ -1,5 +1,4 @@
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model WalletPSBTCombineViewModel @model WalletPSBTCombineViewModel
@{ @{
var walletId = Context.GetRouteValue("walletId").ToString(); var walletId = Context.GetRouteValue("walletId").ToString();

View file

@ -1,9 +1,5 @@
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BundlerMinifier.TagHelpers
@model WalletPSBTViewModel @model WalletPSBTViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
var walletId = Context.GetRouteValue("walletId").ToString(); var walletId = Context.GetRouteValue("walletId").ToString();
var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId }); var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId });

View file

@ -1,7 +1,5 @@
@addTagHelper *, BundlerMinifier.TagHelpers @inject BTCPayServer.Services.BTCPayServerEnvironment env
@inject BTCPayServer.Services.BTCPayServerEnvironment env
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.Components.QRCode @using BTCPayServer.Components.QRCode
@model BTCPayServer.Controllers.WalletReceiveViewModel @model BTCPayServer.Controllers.WalletReceiveViewModel
@{ @{

View file

@ -1,9 +1,5 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@inject BTCPayServer.Security.ContentSecurityPolicies csp @inject BTCPayServer.Security.ContentSecurityPolicies csp
@using Microsoft.AspNetCore.Mvc.ModelBinding @using Microsoft.AspNetCore.Mvc.ModelBinding
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using BTCPayServer.TagHelpers
@using BundlerMinifier.TagHelpers
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@model WalletSendModel @model WalletSendModel
@{ @{

View file

@ -1,6 +1,4 @@
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@using BTCPayServer.TagHelpers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model WalletSendVaultModel @model WalletSendVaultModel
@{ @{
var walletId = Context.GetRouteValue("walletId").ToString(); var walletId = Context.GetRouteValue("walletId").ToString();

View file

@ -1,8 +1,6 @@
@using BTCPayServer.Controllers @using BTCPayServer.Controllers
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model WalletSigningOptionsModel @model WalletSigningOptionsModel
@inject BTCPayNetworkProvider BTCPayNetworkProvider @inject BTCPayNetworkProvider BTCPayNetworkProvider
@addTagHelper *, BundlerMinifier.TagHelpers
@{ @{
var walletId = WalletId.Parse(Context.GetRouteValue("walletId").ToString()); var walletId = WalletId.Parse(Context.GetRouteValue("walletId").ToString());
var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId }); var cancelUrl = Model.ReturnUrl ?? Url.Action(nameof(UIWalletsController.WalletTransactions), new { walletId });

View file

@ -1,4 +1,3 @@
@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Views.Wallets @using BTCPayServer.Views.Wallets
@using BTCPayServer.Models.WalletViewModels @using BTCPayServer.Models.WalletViewModels
@addTagHelper *, BundlerMinifier.TagHelpers

View file

@ -12,4 +12,5 @@
@inject Safe Safe @inject Safe Safe
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, BTCPayServer @addTagHelper *, BTCPayServer
@addTagHelper *, BTCPayServer.Abstractions
@addTagHelper *, BundlerMinifier.TagHelpers @addTagHelper *, BundlerMinifier.TagHelpers