mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-27 07:57:33 +01:00
* Update layout structure and header * Implement store selector * Simplify homepage * Update layout * Use dropdown for store selector * Hide global nav in store context * Horizontal section nav * Remove outer section and container from content views * Update nav * Set store context for invoice and payment request lists * Test fixes * Persist menu collapse state on client-side * MainNav as view component * Update app routes to incorporate store context * Test fixes * Display ticker for altcoins build only * Plugins nav * Incorporate category for active page as well * Update invoice icon * Add apps list to nav * Add store context to app type controllers * Incorporate id for active page as well * Test fixes * AppsController cleanup * Nav: Display only apps for the current store * Remove leftover from merge * Nav styles optimization * Left-align content container * Increase sidebar padding on desktop * Use min-width for store selector menu * Store settings nav update * Update app and payment request routes * Test fixes * Refactor MainNav component to use StoresController * Set store context for invoice actions * Cleanups * Remove CurrentStore checks The response will be "Access denied" in case the CookieAuthorizationHandler cannot resolve the store. * Remove unnecessary store context setters * Test fix
50 lines
2.6 KiB
Text
50 lines
2.6 KiB
Text
@inject UserManager<ApplicationUser> UserManager
|
|
@inject ISettingsRepository SettingsRepository
|
|
@using BTCPayServer.Views.Notifications
|
|
@using BTCPayServer.Abstractions.Extensions
|
|
@using BTCPayServer.Abstractions.Contracts
|
|
@model BTCPayServer.Components.NotificationsDropdown.NotificationSummaryViewModel
|
|
@addTagHelper *, BundlerMinifier.TagHelpers
|
|
|
|
<div id="Notifications">
|
|
@if (Model.UnseenCount > 0)
|
|
{
|
|
<button id="NotificationsHandle" class="mainMenuButton @ViewData.IsActiveCategory(typeof(NotificationsNavPages))" title="Notifications" type="button" data-bs-toggle="dropdown">
|
|
<vc:icon symbol="notifications" />
|
|
<span class="badge rounded-pill bg-danger p-1 ms-1" id="NotificationsBadge">@Model.UnseenCount</span>
|
|
</button>
|
|
<div class="dropdown-menu text-center" id="NotificationsDropdown" aria-labelledby="NotificationsHandle">
|
|
<div class="d-flex align-items-center justify-content-between py-3 px-4 border-bottom border-light">
|
|
<h5 class="m-0">Notifications</h5>
|
|
<form id="notificationsForm" asp-controller="Notifications" asp-action="MarkAllAsSeen" asp-route-returnUrl="@Context.Request.GetCurrentPathWithQueryString()" method="post">
|
|
<button class="btn btn-link p-0" type="submit">Mark all as seen</button>
|
|
</form>
|
|
</div>
|
|
@foreach (var notif in Model.Last5)
|
|
{
|
|
<a asp-action="NotificationPassThrough" asp-controller="Notifications" asp-route-id="@notif.Id" class="notification d-flex align-items-center dropdown-item border-bottom border-light py-3 px-4">
|
|
<div class="me-3">
|
|
<vc:icon symbol="note" />
|
|
</div>
|
|
<div class="notification-item__content">
|
|
<div class="text-start text-wrap">
|
|
@notif.Body
|
|
</div>
|
|
<div class="text-start d-flex">
|
|
<small class="text-muted" data-timeago-unixms="@notif.Created.ToUnixTimeMilliseconds()">@notif.Created.ToTimeAgo()</small>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
}
|
|
<div class="p-3">
|
|
<a asp-controller="Notifications" asp-action="Index">View all</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<a asp-controller="Notifications" asp-action="Index" id="NotificationsHandle" class="mainMenuButton @ViewData.IsActiveCategory(typeof(NotificationsNavPages))" title="Notifications">
|
|
<vc:icon symbol="notifications" />
|
|
</a>
|
|
}
|
|
</div>
|