diff --git a/BTCPayServer/Blazor/BlazorExtensions.cs b/BTCPayServer/Blazor/BlazorExtensions.cs index 909745c41..8e0a136a3 100644 --- a/BTCPayServer/Blazor/BlazorExtensions.cs +++ b/BTCPayServer/Blazor/BlazorExtensions.cs @@ -1,4 +1,3 @@ -using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.JSInterop; namespace BTCPayServer.Blazor diff --git a/BTCPayServer/Blazor/NotificationsDropDown.razor b/BTCPayServer/Blazor/NotificationsDropDown.razor index 272003690..53901cf76 100644 --- a/BTCPayServer/Blazor/NotificationsDropDown.razor +++ b/BTCPayServer/Blazor/NotificationsDropDown.razor @@ -1,4 +1,3 @@ -@using System.Security.Claims @using BTCPayServer.Abstractions.Contracts; @using BTCPayServer.Configuration; @using BTCPayServer.Data; @@ -86,7 +85,8 @@ } public void Dispose() => _EventAggregatorListener?.Dispose(); - string SeenCount(int? count) + + static string SeenCount(int? count) { if (count is not int c) return "0"; @@ -94,12 +94,14 @@ return $"{NotificationManager.MaxUnseen - 1}+"; return c.ToString(); } + void UpdateState((List Items, int? Count) res) { UnseenCount = SeenCount(res.Count); Last5 = res.Items; } - protected async override Task OnParametersSetAsync() + + protected override async Task OnParametersSetAsync() { if (await GetUserId() is string userId) { @@ -117,15 +119,16 @@ } } } - async Task - GetUserId() + + async Task GetUserId() { var state = await _AuthenticationStateProvider.GetAuthenticationStateAsync(); if (!state.User.Identity.IsAuthenticated) return null; return _UserManager.GetUserId(state.User); } - public async Task MarkAllAsSeen() + + private async Task MarkAllAsSeen() { if (await GetUserId() is string userId) { @@ -133,6 +136,7 @@ UnseenCount = "0"; } } + private static string NotificationIcon(string type) { return type switch diff --git a/BTCPayServer/Components/MainLogo/Default.cshtml b/BTCPayServer/Components/MainLogo/Default.cshtml index a76c50bdb..1613fda34 100644 --- a/BTCPayServer/Components/MainLogo/Default.cshtml +++ b/BTCPayServer/Components/MainLogo/Default.cshtml @@ -1,7 +1,5 @@ @using BTCPayServer.Services @using BTCPayServer.Abstractions.Contracts -@using BTCPayServer.Abstractions.Extensions -@using BTCPayServer.Abstractions.TagHelpers @inject ThemeSettings Theme @inject IFileService FileService @model BTCPayServer.Components.MainLogo.MainLogoViewModel diff --git a/BTCPayServer/Components/MainNav/Default.cshtml b/BTCPayServer/Components/MainNav/Default.cshtml index 56130df64..a741717a5 100644 --- a/BTCPayServer/Components/MainNav/Default.cshtml +++ b/BTCPayServer/Components/MainNav/Default.cshtml @@ -4,7 +4,6 @@ @using BTCPayServer.Views.Manage @using BTCPayServer.Views.PaymentRequest @using BTCPayServer.Views.Wallets -@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Client @using BTCPayServer.Components.ThemeSwitch @using BTCPayServer.Components.UIExtensionPoint diff --git a/BTCPayServer/Components/StoreSelector/Default.cshtml b/BTCPayServer/Components/StoreSelector/Default.cshtml index 6d954e66d..440241fe6 100644 --- a/BTCPayServer/Components/StoreSelector/Default.cshtml +++ b/BTCPayServer/Components/StoreSelector/Default.cshtml @@ -1,4 +1,3 @@ -@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Abstractions.Contracts @using BTCPayServer.Client @using BTCPayServer.Components.MainLogo diff --git a/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml b/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml index 28f69c546..5bd9b9fe0 100644 --- a/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml +++ b/BTCPayServer/Views/Shared/LayoutHeadTheme.cshtml @@ -1,6 +1,4 @@ -@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Services -@using Microsoft.AspNetCore.Mvc.TagHelpers @using BTCPayServer.Abstractions.Contracts @inject ThemeSettings Theme @inject IFileService FileService diff --git a/BTCPayServer/Views/Shared/PointOfSale/Public/Cart.cshtml b/BTCPayServer/Views/Shared/PointOfSale/Public/Cart.cshtml index 3561422a5..0159991df 100644 --- a/BTCPayServer/Views/Shared/PointOfSale/Public/Cart.cshtml +++ b/BTCPayServer/Views/Shared/PointOfSale/Public/Cart.cshtml @@ -239,7 +239,7 @@ diff --git a/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml b/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml index 652748724..19aaf210e 100644 --- a/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml +++ b/BTCPayServer/Views/Shared/PointOfSale/Public/VueLight.cshtml @@ -53,7 +53,7 @@ diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index d9a7cb245..31c1fdda0 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -1,15 +1,12 @@ -@using BTCPayServer.Abstractions.Extensions @using BTCPayServer.Components.StoreSelector @using BTCPayServer.Components.MainNav @inject Microsoft.AspNetCore.Http.IHttpContextAccessor _context; @inject BTCPayServer.Services.BTCPayServerEnvironment _env @inject SignInManager _signInManager @inject UserManager _userManager -@inject LinkGenerator _linkGenerator @inject BTCPayServer.Services.PoliciesSettings PoliciesSettings @{ - var notificationsReturnUrl = Context.Request.GetCurrentPathWithQueryString(); var notificationDisabled = PoliciesSettings.DisableInstantNotifications; if (!notificationDisabled) { diff --git a/BTCPayServer/wwwroot/img/supporter-sprite.svg b/BTCPayServer/wwwroot/img/supporter-sprite.svg index 759e6f3e4..2e29fd5b8 100644 --- a/BTCPayServer/wwwroot/img/supporter-sprite.svg +++ b/BTCPayServer/wwwroot/img/supporter-sprite.svg @@ -2,7 +2,7 @@ - + diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css index 9ed9e34dc..300028360 100644 --- a/BTCPayServer/wwwroot/main/site.css +++ b/BTCPayServer/wwwroot/main/site.css @@ -85,10 +85,6 @@ a.unobtrusive-link { text-decoration: inherit; } -.btn.btn-link:focus { - box-shadow: none; -} - [aria-expanded] > svg.icon-caret-down { flex-shrink: 0; width: 24px; diff --git a/BTCPayServer/wwwroot/main/site.js b/BTCPayServer/wwwroot/main/site.js index 18b47b2bd..949b44fc2 100644 --- a/BTCPayServer/wwwroot/main/site.js +++ b/BTCPayServer/wwwroot/main/site.js @@ -155,7 +155,7 @@ const initLabelManagers = () => { document.addEventListener("DOMContentLoaded", () => { // sticky header - const stickyHeader = document.querySelector('#mainContent > section > .sticky-header'); + const stickyHeader = document.querySelector('#mainContent > section .sticky-header'); if (stickyHeader) { const setStickyHeaderHeight = () => { document.documentElement.style.setProperty('--sticky-header-height', `${stickyHeader.offsetHeight}px`) @@ -164,7 +164,6 @@ document.addEventListener("DOMContentLoaded", () => { debounce('resize', setStickyHeaderHeight, 50) }); setStickyHeaderHeight(); - } // initialize timezone offset value if field is present in page