Refactor page titles and active page functionality

This commit is contained in:
Dennis Reimann 2021-12-16 11:17:02 +01:00 committed by Andrew Camilleri
parent 42e731369e
commit 2d7c5cabab
97 changed files with 145 additions and 162 deletions

View file

@ -11,16 +11,14 @@ namespace BTCPayServer.Abstractions.Extensions
private const string ACTIVE_PAGE_KEY = "ActivePage";
private const string ACTIVE_ID_KEY = "ActiveId";
public static void SetActivePageAndTitle<T>(this ViewDataDictionary viewData, T activePage, string title = null, string mainTitle = null)
public static void SetActivePage<T>(this ViewDataDictionary viewData, T activePage, string title = null, string activeId = null)
where T : IConvertible
{
// Browser Title
// Page Title
viewData["Title"] = title ?? activePage.ToString();
// Breadcrumb
viewData["MainTitle"] = mainTitle;
viewData["PageTitle"] = title;
// Navigation
viewData[ACTIVE_PAGE_KEY] = activePage;
viewData[ACTIVE_ID_KEY] = activeId;
SetActiveCategory(viewData, activePage.GetType());
}
@ -29,12 +27,6 @@ namespace BTCPayServer.Abstractions.Extensions
viewData[ACTIVE_CATEGORY_KEY] = activeCategory;
}
// TODO: Refactor this and merge it with SetActivePage
public static void SetActiveId<T>(this ViewDataDictionary viewData, T activeId)
{
viewData[ACTIVE_ID_KEY] = activeId;
}
public static string IsActiveCategory<T>(this ViewDataDictionary viewData, T category, object id = null)
{
if (!viewData.ContainsKey(ACTIVE_CATEGORY_KEY))

View file

@ -1,6 +1,6 @@
@model CreateAppViewModel
@{
ViewData.SetActivePageAndTitle(AppsNavPages.Create, "Create a new app");
ViewData.SetActivePage(AppsNavPages.Create, "Create a new app");
}
@section PageFootContent {

View file

@ -1,7 +1,7 @@
@using BTCPayServer.Services.Apps
@model ListAppsViewModel
@{
ViewData.SetActivePageAndTitle(AppsNavPages.Index, "Apps");
ViewData.SetActivePage(AppsNavPages.Index, "Apps");
var storeNameSortOrder = (string)ViewData["StoreNameSortOrder"];
var appNameSortOrder = (string)ViewData["AppNameSortOrder"];
var appTypeSortOrder = (string)ViewData["AppTypeSortOrder"];
@ -13,7 +13,7 @@
<div class="d-sm-flex align-items-center justify-content-between mb-2">
<h2 class="mb-0">
@ViewData["PageTitle"]
@ViewData["Title"]
<small>
<a href="https://docs.btcpayserver.org/Apps/" target="_blank" rel="noreferrer noopener">
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>

View file

@ -2,8 +2,7 @@
@using System.Globalization
@model UpdateCrowdfundViewModel
@{
ViewData.SetActivePageAndTitle(AppsNavPages.Update, "Update Crowdfund", Model.StoreName);
ViewData.SetActiveId(Model.AppId);
ViewData.SetActivePage(AppsNavPages.Update, $"Update Crowdfund: {Model.AppName}", Model.AppId);
}
@section PageHeadContent {
@ -17,7 +16,7 @@
<partial name="_StatusMessage" />
<h2 class="mb-4">@ViewData["PageTitle"] - @Model.AppName</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<form method="post">
<input type="hidden" asp-for="StoreId" />

View file

@ -2,13 +2,12 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@model UpdatePointOfSaleViewModel
@{
ViewData.SetActivePageAndTitle(AppsNavPages.Update, "Update Point of Sale", Model.StoreName);
ViewData.SetActiveId(Model.Id);
ViewData.SetActivePage(AppsNavPages.Update, $"Update Point of Sale: {Model.AppName}", Model.Id);
}
<partial name="_StatusMessage" />
<h2 class="mb-4">@ViewData["PageTitle"] - @Model.AppName</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<form method="post">
<input type="hidden" asp-for="StoreId" />

View file

@ -1,6 +1,6 @@
@model Fido2NetLib.CredentialCreateOptions
@{
ViewData.SetActivePageAndTitle(ManageNavPages.Fido2, "Register your security device");
ViewData.SetActivePage(ManageNavPages.Fido2, "Register your security device");
}
<form asp-action="CreateResponse" id="registerForm">

View file

@ -1,6 +1,4 @@
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewBag.MainTitle = "Manage your account";
ViewData["NavPartialName"] = "../Manage/_Nav";
}

View file

@ -1,7 +1,7 @@
@model BTCPayServer.Models.InvoicingModels.CreateInvoiceModel
@using BTCPayServer.Services.Apps
@{
ViewData.SetActivePageAndTitle(InvoiceNavPages.Create, "Create Invoice");
ViewData.SetActivePage(InvoiceNavPages.Create, "Create Invoice");
}
@section PageFootContent {

View file

@ -1,7 +1,7 @@
@using BTCPayServer.Client.Models
@model InvoicesModel
@{
ViewData.SetActivePageAndTitle(InvoiceNavPages.Index, "Invoices");
ViewData.SetActivePage(InvoiceNavPages.Index, "Invoices");
var storeIds = string.Join("", Model.StoreIds.Select(storeId => $",storeid:{storeId}"));
}

View file

@ -4,7 +4,7 @@
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../Stores/_Nav";
ViewData.SetActivePageAndTitle(StoreNavPages.Integrations, "Lightning Address Setup", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Integrations, "Lightning Address Setup", Context.GetStoreData().StoreName);
}
@section PageHeadContent {
@ -37,7 +37,7 @@
}
<div class="d-sm-flex align-items-center justify-content-between mb-2">
<h2 class="mb-3 mb-sm-0">@ViewData["PageTitle"]</h2>
<h2 class="mb-3 mb-sm-0">@ViewData["Title"]</h2>
<a data-bs-toggle="collapse" data-bs-target="#AddAddress" class="btn btn-primary" role="button">
<span class="fa fa-plus"></span>
Add Address

View file

@ -1,7 +1,7 @@
@namespace BTCPayServer.Client
@model BTCPayServer.Controllers.ManageController.ApiKeysViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.APIKeys, "API Keys");
ViewData.SetActivePage(ManageNavPages.APIKeys, "API Keys");
}
<h2 class="mb-4">@ViewData["Title"]</h2>
<p>

View file

@ -4,7 +4,7 @@
@model ManageController.AddApiKeyViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.APIKeys, "Generate API Key");
ViewData.SetActivePage(ManageNavPages.APIKeys, "Generate API Key");
}
@section PageHeadContent {
@ -26,7 +26,7 @@
</script>
}
<h2 class="mb-3">@ViewData["PageTitle"]</h2>
<h2 class="mb-3">@ViewData["Title"]</h2>
<p>Generate a new api key to use BTCPay through its API.</p>

View file

@ -1,6 +1,6 @@
@model ChangePasswordViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.ChangePassword, "Change your password");
ViewData.SetActivePage(ManageNavPages.ChangePassword, "Change your password");
}
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">

View file

@ -1,6 +1,6 @@
@model EnableAuthenticatorViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.TwoFactorAuthentication, "Enable authenticator app");
ViewData.SetActivePage(ManageNavPages.TwoFactorAuthentication, "Enable authenticator app");
}
<div>

View file

@ -1,6 +1,6 @@
@model GenerateRecoveryCodesViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.TwoFactorAuthentication, "Recovery codes");
ViewData.SetActivePage(ManageNavPages.TwoFactorAuthentication, "Recovery codes");
}
<div class="alert alert-warning" role="alert">

View file

@ -1,6 +1,6 @@
@model IndexViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.Index, "Update your account");
ViewData.SetActivePage(ManageNavPages.Index, "Update your account");
}
<h2 class="mb-4">@ViewData["Title"]</h2>
<form method="post">

View file

@ -2,7 +2,7 @@
@model BTCPayServer.Controllers.ManageController.NotificationSettingsViewModel
@inject IEnumerable<INotificationHandler> NotificationHandlers
@{
ViewData.SetActivePageAndTitle(ManageNavPages.Notifications, "Notification Settings");
ViewData.SetActivePage(ManageNavPages.Notifications, "Notification Settings");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,6 +1,6 @@
@model BTCPayServer.Models.ManageViewModels.SetPasswordViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.ChangePassword, "Set password");
ViewData.SetActivePage(ManageNavPages.ChangePassword, "Set password");
}
<h4>Set your password</h4>

View file

@ -1,6 +1,6 @@
@model TwoFactorAuthenticationViewModel
@{
ViewData.SetActivePageAndTitle(ManageNavPages.TwoFactorAuthentication, "Two-Factor Authentication");
ViewData.SetActivePage(ManageNavPages.TwoFactorAuthentication, "Two-Factor Authentication");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -5,7 +5,7 @@
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../Stores/_Nav";
ViewData.SetActivePageAndTitle(StoreNavPages.ActivePage, $"{Model.CryptoCode} Settings");
ViewData.SetActivePage(StoreNavPages.ActivePage, $"{Model.CryptoCode} Settings");
}
<div class="row">

View file

@ -4,7 +4,7 @@
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.ActivePage, "Monero Settings");
ViewData.SetActivePage(StoreNavPages.ActivePage, "Monero Settings");
ViewData["NavPartialName"] = "../Stores/_Nav";
}

View file

@ -3,7 +3,7 @@
@model BTCPayServer.Models.PaymentRequestViewModels.UpdatePaymentRequestViewModel
@addTagHelper *, BundlerMinifier.TagHelpers
@{
ViewData.SetActivePageAndTitle(PaymentRequestsNavPages.Create, (string.IsNullOrEmpty(Model.Id) ? "Create" : "Edit") + " Payment Request");
ViewData.SetActivePage(PaymentRequestsNavPages.Create, (string.IsNullOrEmpty(Model.Id) ? "Create" : "Edit") + " Payment Request");
}
@section PageHeadContent {

View file

@ -1,6 +1,6 @@
@model LndServicesViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, $"C-Lightning {Model.ConnectionType}");
ViewData.SetActivePage(ServerNavPages.Services, $"C-Lightning {Model.ConnectionType}");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,6 +1,6 @@
@model LightningWalletServices
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "BTCPay Server Configurator");
ViewData.SetActivePage(ServerNavPages.Services, "BTCPay Server Configurator");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,7 +1,7 @@
@using BTCPayServer.Controllers
@model BTCPayServer.Controllers.ServerController.CreateTemporaryFileUrlViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, $"Create temporary file link");
ViewData.SetActivePage(ServerNavPages.Services, $"Create temporary file link");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,6 +1,6 @@
@model BTCPayServer.Controllers.RegisterFromAdminViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Users, "Create account");
ViewData.SetActivePage(ServerNavPages.Users, "Create account");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,6 +1,6 @@
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Dynamic DNS Service");
ViewData.SetActivePage(ServerNavPages.Services, "Dynamic DNS Service");
}
@section PageFootContent {
@ -11,7 +11,7 @@
</script>
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-md-8">

View file

@ -1,13 +1,13 @@
@model BTCPayServer.Models.ServerViewModels.DynamicDnsViewModel[]
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Dynamic DNS Settings");
ViewData.SetActivePage(ServerNavPages.Services, "Dynamic DNS Settings");
}
<div class="row">
<div class="col-md-8">
<div class="d-sm-flex align-items-center justify-content-between mb-3">
<h2 class="mb-0">
@ViewData["PageTitle"]
@ViewData["Title"]
<small>
<a href="https://docs.btcpayserver.org/Apps/" target="_blank" rel="noreferrer noopener">
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Storage.Services.Providers.AmazonS3Storage.Configuration.AmazonS3StorageConfiguration
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Amazon S3 Storage");
ViewData.SetActivePage(ServerNavPages.Services, "Amazon S3 Storage");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-lg-6">

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration.AzureBlobStorageConfiguration
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Azure Blob Storage");
ViewData.SetActivePage(ServerNavPages.Services, "Azure Blob Storage");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-lg-6">

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Storage.Services.Providers.FileSystemStorage.Configuration.FileSystemStorageConfiguration
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, $"Local Filesystem Storage");
ViewData.SetActivePage(ServerNavPages.Services, $"Local Filesystem Storage");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<p>Any uploaded files are being saved on the same machine that hosts BTCPay; please pay attention to your storage space.</p>
<div class="row">

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Storage.Services.Providers.GoogleCloudStorage.Configuration.GoogleCloudStorageConfiguration
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Google Cloud Storage");
ViewData.SetActivePage(ServerNavPages.Services, "Google Cloud Storage");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-lg-6">

View file

@ -1,6 +1,6 @@
@model EmailsViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Emails);
ViewData.SetActivePage(ServerNavPages.Emails);
}
<partial name="EmailsBody" model="Model" />

View file

@ -1,9 +1,9 @@
@model ViewFilesViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Files, "File Storage");
ViewData.SetActivePage(ServerNavPages.Files, "File Storage");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
@if (!Model.StorageConfigured)
{

View file

@ -1,9 +1,9 @@
@model ChargeServiceViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Lightning charge service");
ViewData.SetActivePage(ServerNavPages.Services, "Lightning charge service");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-md-8">

View file

@ -1,9 +1,9 @@
@model LightningWalletServices
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, Model.WalletName);
ViewData.SetActivePage(ServerNavPages.Services, Model.WalletName);
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
@if (Model.ShowQR)
{

View file

@ -3,7 +3,7 @@
@model BTCPayServer.Controllers.ServerController.ListPluginsViewModel
@inject BTCPayServerOptions BTCPayServerOptions
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Plugins);
ViewData.SetActivePage(ServerNavPages.Plugins);
var installed = Model.Installed.ToDictionary(plugin => plugin.Identifier.ToLowerInvariant(), plugin => plugin.Version);
var availableAndNotInstalled = Model.Available
.Where(plugin => !installed.ContainsKey(plugin.Identifier.ToLowerInvariant()))

View file

@ -1,6 +1,6 @@
@model UsersViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Users);
ViewData.SetActivePage(ServerNavPages.Users);
var nextUserEmailSortOrder = (string)ViewData["NextUserEmailSortOrder"];
String userEmailSortOrder = null;
switch (nextUserEmailSortOrder)

View file

@ -1,6 +1,6 @@
@model LndSeedBackupViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "LND Seed Backup");
ViewData.SetActivePage(ServerNavPages.Services, "LND Seed Backup");
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,6 +1,6 @@
@model LndServicesViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, $"LND {Model.ConnectionType}");
ViewData.SetActivePage(ServerNavPages.Services, $"LND {Model.ConnectionType}");
}
<div class="row">

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Models.ServerViewModels.LogsViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Logs, "Logs");
ViewData.SetActivePage(ServerNavPages.Logs, "Logs");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<ul class="list-unstyled">
@foreach (var file in Model.LogFiles)

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Models.ServerViewModels.MaintenanceViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Maintenance, "Maintenance");
ViewData.SetActivePage(ServerNavPages.Maintenance, "Maintenance");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<form method="post">
<div class="row mb-5">

View file

@ -1,9 +1,9 @@
@model LightningWalletServices
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, Model.WalletName);
ViewData.SetActivePage(ServerNavPages.Services, Model.WalletName);
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
@if (Model.ShowQR)
{

View file

@ -3,7 +3,7 @@
@model BTCPayServer.Services.PoliciesSettings
@inject SettingsRepository _SettingsRepository
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Policies);
ViewData.SetActivePage(ServerNavPages.Policies);
}
<h2 class="mb-4">@ViewData["Title"]</h2>

View file

@ -1,9 +1,9 @@
@model LightningWalletServices
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, Model.WalletName);
ViewData.SetActivePage(ServerNavPages.Services, Model.WalletName);
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
@if (Model.ShowQR)
{

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Models.ServerViewModels.SSHServiceViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "SSH settings");
ViewData.SetActivePage(ServerNavPages.Services, "SSH settings");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-md-8">
<div class="form-group">

View file

@ -1,9 +1,9 @@
@model BTCPayServer.Models.ServerViewModels.ServicesViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Services");
ViewData.SetActivePage(ServerNavPages.Services, "Services");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="mb-5">
<h4 class="mb-3">Crypto services exposed by your server</h4>

View file

@ -1,10 +1,10 @@
@using BTCPayServer.Storage.Models
@model BTCPayServer.Storage.ViewModels.ChooseStorageViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "Storage");
ViewData.SetActivePage(ServerNavPages.Services, "Storage");
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
@if (Model.ShowChangeWarning)
{

View file

@ -1,13 +1,13 @@
@model BTCPayServer.Services.ThemeSettings
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Theme, "Theme");
ViewData.SetActivePage(ServerNavPages.Theme, "Theme");
}
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-lg-6">

View file

@ -1,9 +1,9 @@
@model UsersViewModel.UserViewModel
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Users, Model.Email);
ViewData.SetActivePage(ServerNavPages.Users, Model.Email);
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-md-8">

View file

@ -1,7 +1,6 @@
@{
Layout = "/Views/Shared/_Layout.cshtml";
ViewBag.ShowMenu = ViewBag.ShowMenu ?? true;
ViewBag.ShowMainTitle = ViewBag.ShowMainTitle ?? true;
if (!ViewData.ContainsKey("NavPartialName"))
{
ViewData["NavPartialName"] = "_Nav";
@ -16,10 +15,6 @@
@await RenderSectionAsync("PageFootContent", false)
}
@if (!string.IsNullOrEmpty(ViewData["MainTitle"] as string))
{
<h2 class="mb-5">@ViewData["MainTitle"]</h2>
}
@if (ViewBag.ShowMenu)
{
<nav class="nav">

View file

@ -5,7 +5,7 @@
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../Stores/_Nav";
ViewData.SetActivePageAndTitle(StoreNavPages.Integrations, "Integrations");
ViewData.SetActivePage(StoreNavPages.Integrations, "Integrations");
var shopifyCredsSet = Model?.IntegratedAt.HasValue is true;
var shopifyUrl = Model?.ShopifyUrl;

View file

@ -4,7 +4,7 @@
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../Stores/_Nav";
ViewData.SetActivePageAndTitle(StoreNavPages.PullPayments, "New pull payment", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PullPayments, "New pull payment", Context.GetStoreData().StoreName);
}
<div class="row">

View file

@ -7,7 +7,7 @@
@inject IEnumerable<IPayoutHandler> PayoutHandlers;
@{
ViewData.SetActivePageAndTitle(StoreNavPages.Payouts, $"Payouts{(string.IsNullOrEmpty(Model.PullPaymentName) ? string.Empty : " for pull payment " + Model.PullPaymentName)}", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Payouts, $"Payouts{(string.IsNullOrEmpty(Model.PullPaymentName) ? string.Empty : " for pull payment " + Model.PullPaymentName)}", Context.GetStoreData().StoreName);
Model.PaginationQuery ??= new Dictionary<string, object>();
Model.PaginationQuery.Add("pullPaymentId", Model.PullPaymentId);
Model.PaginationQuery.Add("paymentMethodId", Model.PaymentMethodId);

View file

@ -3,7 +3,7 @@
@using BTCPayServer.Client
@model BTCPayServer.Models.WalletViewModels.PullPaymentsModel
@{
ViewData.SetActivePageAndTitle(StoreNavPages.PullPayments, "Pull payments", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PullPayments, "Pull payments", Context.GetStoreData().StoreName);
var nextStartDateSortOrder = (string)ViewData["NextStartSortOrder"];
string startDateSortOrder = null;
switch (nextStartDateSortOrder)

View file

@ -2,7 +2,7 @@
@model CheckoutAppearanceViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.CheckoutAppearance, "Checkout experience", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.CheckoutAppearance, "Checkout experience", Context.GetStoreData().StoreName);
}
<div class="row">

View file

@ -1,13 +1,13 @@
@model CreateTokenViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Tokens, "Create New Token", Context.GetStoreData()?.StoreName);
ViewData.SetActivePage(StoreNavPages.Tokens, "Create New Token", Context.GetStoreData()?.StoreName);
ViewBag.HidePublicKey = ViewBag.HidePublicKey ?? false;
ViewBag.ShowStores = ViewBag.ShowStores ?? false;
}
<div class="row">
<div class="col-lg-6">
<h3 class="mb-4">@ViewData["PageTitle"]</h3>
<h3 class="mb-4">@ViewData["Title"]</h3>
<form method="post">
<div class="form-group">
<label asp-for="Label" class="form-label"></label>

View file

@ -1,7 +1,7 @@
@model BTCPayServer.Models.ServerViewModels.EmailsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.GeneralSettings, "Email Settings", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.GeneralSettings, "Email Settings", Context.GetStoreData().StoreName);
}
<partial name="EmailsBody" model="Model" />

View file

@ -1,7 +1,7 @@
@model GeneralSettingsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.GeneralSettings, "General Settings", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.GeneralSettings, "General Settings", Context.GetStoreData().StoreName);
}
<div class="row">

View file

@ -4,7 +4,7 @@
var isHotWallet = Model.Method == WalletSetupMethod.HotWallet;
var type = isHotWallet ? "Hot" : "Watch-Only";
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, $"Create {Model.CryptoCode} {type} Wallet", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, $"Create {Model.CryptoCode} {type} Wallet", Context.GetStoreData().StoreName);
ViewData.Add(nameof(Model.CanUseHotWallet), Model.CanUseHotWallet);
ViewData.Add(nameof(Model.CanUseRPCImport), Model.CanUseRPCImport);
ViewData.Add(nameof(Model.SupportSegwit), Model.SupportSegwit);

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, $"Generate {Model.CryptoCode} Wallet", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, $"Generate {Model.CryptoCode} Wallet", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Confirm addresses", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Confirm addresses", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Import your wallet file", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Import your wallet file", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Connect your hardware wallet", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Connect your hardware wallet", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Scan QR code", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Scan QR code", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Enter the wallet seed", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Enter the wallet seed", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Enter your extended public key", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Enter your extended public key", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -3,7 +3,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, $"Import {Model.CryptoCode} Wallet", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, $"Import {Model.CryptoCode} Wallet", Context.GetStoreData().StoreName);
}
@section Navbar {

View file

@ -1,7 +1,7 @@
@model IntegrationsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Integrations, "Integrations", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Integrations, "Integrations", Context.GetStoreData().StoreName);
}
<div class="row">

View file

@ -2,7 +2,7 @@
@model LightningSettingsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, $"{Model.CryptoCode} Lightning Settings", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, $"{Model.CryptoCode} Lightning Settings", Context.GetStoreData().StoreName);
}
<div class="row">

View file

@ -1,7 +1,7 @@
@model TokensViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Tokens, "Access Tokens", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Tokens, "Access Tokens", Context.GetStoreData().StoreName);
}
@if (Model.StoreNotConfigured)
@ -18,7 +18,7 @@
<div class="row">
<div class="col-lg-8">
<div class="d-flex align-items-center justify-content-between mb-3">
<h3 class="mb-0">@ViewData["PageTitle"]</h3>
<h3 class="mb-0">@ViewData["Title"]</h3>
<a id="CreateNewToken" asp-action="CreateToken" class="btn btn-primary" role="button" asp-route-storeId="@Context.GetRouteValue("storeId")">
<span class="fa fa-plus"></span>
Create New Token
@ -85,4 +85,4 @@
</div>
</div>
<partial name="_Confirm" model="@(new ConfirmModel("Revoke access token", "The access token will be revoked. Do you wish to continue?", "Revoke"))" />
<partial name="_Confirm" model="@(new ConfirmModel("Revoke access token", "The access token will be revoked. Do you wish to continue?", "Revoke"))" />

View file

@ -2,7 +2,7 @@
@using BTCPayServer.Client.Models;
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Webhook Settings", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Webhooks, "Webhook Settings", Context.GetStoreData().StoreName);
}
@section PageHeadContent {
@ -15,7 +15,7 @@
<div class="row">
<div class="col-lg-8">
<form method="post">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
<div class="form-group">
<label asp-for="PayloadUrl" class="form-label">Payload URL</label>
<input asp-for="PayloadUrl" class="form-control" />

View file

@ -2,7 +2,7 @@
@model PayButtonViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().StoreName);
csp.AllowUnsafeHashes("onBTCPayFormSubmit(event);return false");
}
@ -72,7 +72,7 @@
<div id="payButtonCtrl">
<div class="row">
<div class="col-lg-7">
<h3 class="mb-3">@ViewData["PageTitle"]</h3>
<h3 class="mb-3">@ViewData["Title"]</h3>
<div class="row">
<p>Configure your Pay Button, and the generated code will be displayed at the bottom of the page to copy into your project.</p>
<h4 class="mt-3 mb-3">General Settings</h4>

View file

@ -1,11 +1,11 @@
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PayButton, "Pay Button", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-md-10">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
<p>
To start using Pay Button, you need to enable this feature explicitly.
Once you do so, anyone could create an invoice on your store (via API, for example).

View file

@ -4,7 +4,7 @@
@model PaymentMethodsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Wallets", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Wallets", Context.GetStoreData().StoreName);
}
<div class="row">

View file

@ -1,12 +1,12 @@
@model BTCPayServer.Models.StoreViewModels.RatesViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Rates, "Rates", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Rates, "Rates", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>

View file

@ -1,10 +1,10 @@
@model PairingModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Tokens, "Pairing Permission", Context.GetStoreData()?.StoreName);
ViewData.SetActivePage(StoreNavPages.Tokens, "Pairing Permission", Context.GetStoreData()?.StoreName);
}
<h3 class="mb-0">@ViewData["PageTitle"]</h3>
<h3 class="mb-0">@ViewData["Title"]</h3>
<div class="row">
<div class="col-md-4">
<table class="table table-hover removetopborder">
@ -31,4 +31,4 @@
<button id="ApprovePairing" type="submit" class="btn btn-primary mt-3" title="Approve this pairing demand">Approve</button>
</form>
</div>
</div>
</div>

View file

@ -1,7 +1,7 @@
@model LightningNodeViewModel
@{
Layout = "_LayoutWalletSetup.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, "Connect to a Lightning node", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, "Connect to a Lightning node", Context.GetStoreData().StoreName);
}
<header class="text-center">

View file

@ -1,7 +1,7 @@
@model WalletSetupViewModel
@{
Layout = "_LayoutWalletSetup";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, $"Setup {Model.CryptoCode} Wallet", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, $"Setup {Model.CryptoCode} Wallet", Context.GetStoreData().StoreName);
}
<h1 class="text-center">Let's get started</h1>

View file

@ -1,10 +1,10 @@
@model BTCPayServer.Security.Bitpay.BitTokenEntity
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Tokens, "Access Tokens", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Tokens, "Access Tokens", Context.GetStoreData().StoreName);
}
<h3 class="mb-4">@ViewData["PageTitle"]</h3>
<h3 class="mb-4">@ViewData["Title"]</h3>
<div class="row">
<div class="col-md-8">

View file

@ -1,12 +1,12 @@
@model StoreUsersViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Users, "Store Users", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Users, "Store Users", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<h3 class="mb-3">@ViewData["PageTitle"]</h3>
<h3 class="mb-3">@ViewData["Title"]</h3>
<p>
Give other registered BTCPay Server users access to your store.<br />
Guests will not be able to see or modify the store settings.
@ -64,4 +64,4 @@
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
}
}

View file

@ -2,13 +2,13 @@
@using BTCPayServer.Client.Models;
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Send a test event to a webhook endpoint", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Webhooks, "Send a test event to a webhook endpoint", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<form method="post">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
<div class="form-group">
<label for="Type" class="form-label">Event type</label>

View file

@ -4,7 +4,7 @@
@model WalletSettingsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.PaymentMethods, $"{Model.CryptoCode} Wallet Settings", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.PaymentMethods, $"{Model.CryptoCode} Wallet Settings", Context.GetStoreData().StoreName);
}
@section PageHeadContent {

View file

@ -1,11 +1,11 @@
@model WebhooksViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Webhooks, "Webhooks", Context.GetStoreData().StoreName);
ViewData.SetActivePage(StoreNavPages.Webhooks, "Webhooks", Context.GetStoreData().StoreName);
}
<div class="d-flex align-items-center justify-content-between mb-3">
<h4 class="mb-0">@ViewData["PageTitle"]</h4>
<h4 class="mb-0">@ViewData["Title"]</h4>
<a id="CreateWebhook" asp-action="NewWebhook" class="btn btn-primary" role="button" asp-route-storeId="@Context.GetRouteValue("storeId")">
<span class="fa fa-plus"></span>
Create a new webhook

View file

@ -1,6 +1,6 @@
@model BTCPayServer.Models.StoreViewModels.CreateStoreViewModel
@{
ViewData.SetActivePageAndTitle(StoreNavPages.Create, "Create a new store");
ViewData.SetActivePage(StoreNavPages.Create, "Create a new store");
}
@section PageFootContent {
@ -9,7 +9,7 @@
<partial name="_StatusMessage" />
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<h2 class="mb-4">@ViewData["Title"]</h2>
<div class="row">
<div class="col-lg-6">
<form asp-action="CreateStore">

View file

@ -1,6 +1,6 @@
@model StoresViewModel
@{
ViewData.SetActivePageAndTitle(StoreNavPages.Index, "Stores");
ViewData.SetActivePage(StoreNavPages.Index, "Stores");
var storeNameSortOrder = (string)ViewData["StoreNameSortOrder"];
var storeWebsiteSortOrder = (string)ViewData["StoreWebsiteSortOrder"];
var sortByDesc = "Sort by descending...";
@ -10,7 +10,7 @@
<partial name="_StatusMessage" />
<div class="d-sm-flex align-items-center justify-content-between mb-2">
<h2 class="mb-0">@ViewData["PageTitle"]</h2>
<h2 class="mb-0">@ViewData["Title"]</h2>
<a asp-action="CreateStore" class="btn btn-primary mt-3 mt-sm-0" role="button" id="CreateStore"><span class="fa fa-plus"></span> Create a new store</a>
</div>

View file

@ -1,6 +1,6 @@
@model BTCPayServer.Models.WalletViewModels.ListWalletsViewModel
@{
ViewData.SetActivePageAndTitle(WalletsNavPages.Index, "Wallets");
ViewData.SetActivePage(WalletsNavPages.Index, "Wallets");
}
<partial name="_StatusMessage" />

View file

@ -1,7 +1,7 @@
@model SignWithSeedViewModel
@{
Layout = "_LayoutWizard";
ViewData.SetActivePageAndTitle(WalletsNavPages.Send, "Sign PSBT", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Send, "Sign PSBT", Context.GetStoreData().StoreName);
}
@section Navbar {
@ -21,7 +21,7 @@
}
<header class="text-center">
<h1>@ViewData["PageTitle"]</h1>
<h1>@ViewData["Title"]</h1>
<p class="lead text-secondary mt-3">Using an HD private key or mnemonic seed</p>
</header>

View file

@ -2,7 +2,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, "Decode PSBT", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.PSBT, "Decode PSBT", Context.GetStoreData().StoreName);
}
@section PageHeadContent {
@ -22,7 +22,7 @@
</script>
}
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
<div class="row">
<div class="col-lg-10">

View file

@ -1,7 +1,7 @@
@model WalletPSBTCombineViewModel
@{
Layout = "_LayoutWizard";
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, "Combine PSBT", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.PSBT, "Combine PSBT", Context.GetStoreData().StoreName);
}
@section Navbar {
@ -11,7 +11,7 @@
}
<header class="text-center">
<h1>@ViewData["PageTitle"]</h1>
<h1>@ViewData["Title"]</h1>
</header>
<form class="form-group" method="post" asp-action="WalletPSBTCombine" enctype="multipart/form-data">

View file

@ -5,7 +5,7 @@
var isSignable = !isReady && Model.NBXSeedAvailable;
var needsExport = !isSignable && !isReady;
Layout = "_LayoutWizard";
ViewData.SetActivePageAndTitle(WalletsNavPages.PSBT, isReady ? "Confirm broadcasting this transaction" : "Transaction Details", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.PSBT, isReady ? "Confirm broadcasting this transaction" : "Transaction Details", Context.GetStoreData().StoreName);
}
@section PageHeadContent {
@ -42,7 +42,7 @@
}
<header class="text-center mb-3">
<h1>@ViewData["PageTitle"]</h1>
<h1>@ViewData["Title"]</h1>
</header>
<partial name="_PSBTInfo" model="Model" />

View file

@ -2,7 +2,7 @@
@model BTCPayServer.Controllers.WalletReceiveViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.Receive, $"Receive {Model.CryptoCode}", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Receive, $"Receive {Model.CryptoCode}", Context.GetStoreData().StoreName);
}
@section PageHeadContent
@ -16,7 +16,7 @@
<div class="card-body">
@if (string.IsNullOrEmpty(Model.Address))
{
<h3 class="card-title mb-3">@ViewData["PageTitle"]</h3>
<h3 class="card-title mb-3">@ViewData["Title"]</h3>
<button id="generateButton" class="btn btn-lg btn-primary" type="submit" name="command" value="generate-new-address">Generate @Model.CryptoCode address</button>
}
else

View file

@ -1,10 +1,10 @@
@model RescanWalletModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.Rescan, "Rescan wallet", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Rescan, "Rescan wallet", Context.GetStoreData().StoreName);
}
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
@if (!Model.Ok)
{

View file

@ -4,7 +4,7 @@
@model WalletSendModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.Send, $"Send {Model.CryptoCode}", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Send, $"Send {Model.CryptoCode}", Context.GetStoreData().StoreName);
csp.Add("worker-src", "blob:");
}
@ -29,7 +29,7 @@
<div class="row">
<div class="col-lg-8 col-xl-7 @(!Model.InputSelection && Model.Outputs.Count == 1 ? "transaction-output-form" : "")">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<h4 class="mb-3">@ViewData["Title"]</h4>
<form method="post" asp-action="WalletSend" asp-route-walletId="@Context.GetRouteValue("walletId")">
<input type="hidden" asp-for="InputSelection" />
<input type="hidden" asp-for="FiatDivisibility" />

View file

@ -1,7 +1,7 @@
@model WalletSendVaultModel
@{
Layout = "_LayoutWizard";
ViewData.SetActivePageAndTitle(WalletsNavPages.Send, "Sign the transaction", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Send, "Sign the transaction", Context.GetStoreData().StoreName);
}
@section Navbar {
@ -14,7 +14,7 @@
}
<header class="text-center">
<h1>@ViewData["PageTitle"]</h1>
<h1>@ViewData["Title"]</h1>
<p class="lead text-secondary mt-3">Using BTCPay Server Vault</p>
</header>

View file

@ -3,7 +3,7 @@
@addTagHelper *, BundlerMinifier.TagHelpers
@{
Layout = "_LayoutWizard";
ViewData.SetActivePageAndTitle(WalletsNavPages.Send, "Sign the transaction", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Send, "Sign the transaction", Context.GetStoreData().StoreName);
var walletId = WalletId.Parse(Context.GetRouteValue("walletId").ToString());
}

View file

@ -1,7 +1,7 @@
@model ListTransactionsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(WalletsNavPages.Transactions, $"{Model.CryptoCode} Transactions", Context.GetStoreData().StoreName);
ViewData.SetActivePage(WalletsNavPages.Transactions, $"{Model.CryptoCode} Transactions", Context.GetStoreData().StoreName);
}
@section PageHeadContent {
@ -71,7 +71,7 @@
}
<div class="d-flex align-items-center justify-content-between mb-3">
<h4 class="mb-0">@ViewData["PageTitle"]</h4>
<h4 class="mb-0">@ViewData["Title"]</h4>
<form method="post" asp-action="WalletActions" asp-route-walletId="@Context.GetRouteValue("walletId")">
<div class="dropdown">
<button class="btn btn-outline-secondary dropdown-toggle py-1 px-3" type="button" id="ActionsDropdownToggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">