Move ConfirmModel to Abstractions (#3964)

To make it available to plugins.
This commit is contained in:
d11n 2022-07-15 05:38:33 +02:00 committed by GitHub
parent f8619e382b
commit e8291eb00e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 32 additions and 12 deletions

View file

@ -1,6 +1,6 @@
using System;
namespace BTCPayServer.Models
namespace BTCPayServer.Abstractions.Models
{
public class ConfirmModel
{

View file

@ -2,6 +2,7 @@ using System;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client;
using BTCPayServer.Data;
using BTCPayServer.Models;

View file

@ -41,7 +41,6 @@ namespace BTCPayServer.Controllers
return View("Confirm", new ConfirmModel
{
Title = "Delete API key",
DescriptionHtml = true,
Description = $"Any application using the API key <strong>{key.Label ?? key.Id}<strong> will immediately lose access.",
Action = "Delete",
ActionName = nameof(DeleteAPIKeyPost)

View file

@ -3,6 +3,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client.Models;
using BTCPayServer.Data;
using BTCPayServer.Models;

View file

@ -664,7 +664,6 @@ namespace BTCPayServer.Controllers
{
Title = $"Replace {network.CryptoCode} wallet",
Description = WalletReplaceWarning(derivation.IsHotWallet),
DescriptionHtml = true,
Action = "Setup new wallet"
});
}
@ -702,7 +701,6 @@ namespace BTCPayServer.Controllers
{
Title = $"Remove {network.CryptoCode} wallet",
Description = WalletRemoveWarning(derivation.IsHotWallet, network.CryptoCode),
DescriptionHtml = true,
Action = "Remove"
});
}
@ -803,7 +801,7 @@ namespace BTCPayServer.Controllers
? ""
: " or imported it into an external wallet. If you no longer have access to your private key (recovery seed), immediately replace the wallet";
return
$"<p class=\"text-danger fw-bold\">Please note that this is a {walletType} wallet!</p>" +
$"<p class=\"text-danger fw-bold\">Please note that this is a <strong>{walletType} wallet</strong>!</p>" +
$"<p class=\"text-danger fw-bold\">Do not proceed if you have not backed up the wallet{additionalText}.</p>" +
$"<p class=\"text-start mb-0\">This action will erase the current wallet data from the server. {info}</p>";
}

View file

@ -6,6 +6,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client;
using BTCPayServer.Configuration;
using BTCPayServer.Data;

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Models;
using BTCPayServer.Client;
using BTCPayServer.Data;
using BTCPayServer.Models;

View file

@ -1,4 +1,4 @@
@model ConfirmModel
@model BTCPayServer.Abstractions.Models.ConfirmModel
@{
ViewData["Title"] = Model.Title;

View file

@ -1,4 +1,4 @@
@model ConfirmModel
@model BTCPayServer.Abstractions.Models.ConfirmModel
@inject LinkGenerator linkGenerator
@{
string actionUrl = null;

View file

@ -1,4 +1,4 @@
@model ConfirmModel
@model BTCPayServer.Abstractions.Models.ConfirmModel
<div class="modal fade" id="ConfirmModal" tabindex="-1" aria-labelledby="ConfirmTitle" aria-hidden="true">
<partial name="ConfirmModal" model="Model" />
</div>

View file

@ -1,4 +1,5 @@
@using BTCPayServer.Services.Apps
@using BTCPayServer.Abstractions.Models
@model ListAppsViewModel
@{
ViewData.SetActivePage(AppsNavPages.Index, "Apps");

View file

@ -1,5 +1,6 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@using System.Globalization
@using BTCPayServer.Abstractions.Models
@model UpdateCrowdfundViewModel
@{
ViewData.SetActivePage(AppsNavPages.Update, "Update Crowdfund", Model.AppId);

View file

@ -1,4 +1,5 @@
@using BTCPayServer.Services.Apps
@using BTCPayServer.Abstractions.Models
@addTagHelper *, BundlerMinifier.TagHelpers
@model UpdatePointOfSaleViewModel
@{

View file

@ -1,5 +1,6 @@
@using BTCPayServer.Views.Stores
@using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Abstractions.Models
@model UILNURLController.EditLightningAddressVM
@{
ViewData.SetActivePage("LightningAddress", nameof(StoreNavPages), "Lightning Address", Context.GetStoreData().Id);

View file

@ -1,4 +1,5 @@
@namespace BTCPayServer.Client
@using BTCPayServer.Abstractions.Models
@model BTCPayServer.Controllers.UIManageController.ApiKeysViewModel
@{
ViewData.SetActivePage(ManageNavPages.APIKeys, "API Keys");

View file

@ -1,3 +1,4 @@
@using BTCPayServer.Abstractions.Models
@model IndexViewModel
@{
ViewData.SetActivePage(ManageNavPages.Index, "Update your account");

View file

@ -1,4 +1,5 @@
@using Fido2NetLib
@using BTCPayServer.Abstractions.Models
@model TwoFactorAuthenticationViewModel
@{
ViewData.SetActivePage(ManageNavPages.TwoFactorAuthentication, "Two-Factor Authentication");

View file

@ -1,4 +1,5 @@
@using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Abstractions.Models
@model List<BTCPayServer.PayoutProcessors.UIPayoutProcessorsController.StorePayoutProcessorsView>
@{
ViewData["NavPartialName"] = "../UIStores/_Nav";

View file

@ -1,4 +1,5 @@
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel[]
@using BTCPayServer.Abstractions.Models
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel[]
@{
ViewData.SetActivePage(ServerNavPages.Services, "Dynamic DNS Settings");
}

View file

@ -1,4 +1,5 @@
@model UsersViewModel
@using BTCPayServer.Abstractions.Models
@model UsersViewModel
@{
ViewData.SetActivePage(ServerNavPages.Users);
var nextUserEmailSortOrder = (string)ViewData["NextUserEmailSortOrder"];

View file

@ -1,4 +1,5 @@
@model LndSeedBackupViewModel
@using BTCPayServer.Abstractions.Models
@model LndSeedBackupViewModel
@{
ViewData.SetActivePage(ServerNavPages.Services, "LND Seed Backup");
}

View file

@ -1,3 +1,4 @@
@using BTCPayServer.Abstractions.Models
@model BTCPayServer.Models.ServerViewModels.SSHServiceViewModel
@{
ViewData.SetActivePage(ServerNavPages.Services, "SSH settings");

View file

@ -1,5 +1,6 @@
@using BTCPayServer.Views.Stores
@using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Abstractions.Models
@using BTCPayServer.Client
@using BTCPayServer.Client.Models
@using ExchangeSharp

View file

@ -1,3 +1,4 @@
@using BTCPayServer.Abstractions.Models
@model GeneralSettingsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";

View file

@ -1,3 +1,4 @@
@using BTCPayServer.Abstractions.Models
@model TokensViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";

View file

@ -1,3 +1,4 @@
@using BTCPayServer.Abstractions.Models
@model BTCPayServer.Models.StoreViewModels.RatesViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";

View file

@ -1,4 +1,5 @@
@model StoreUsersViewModel
@using BTCPayServer.Abstractions.Models
@model StoreUsersViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePage(StoreNavPages.Users, "Store Users", Context.GetStoreData().Id);

View file

@ -1,6 +1,7 @@
@using NBitcoin.DataEncoders
@using Newtonsoft.Json
@using System.Text
@using BTCPayServer.Abstractions.Models
@model WalletSettingsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";

View file

@ -1,3 +1,4 @@
@using BTCPayServer.Abstractions.Models
@model WebhooksViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";