2021-03-19 12:05:46 +01:00
|
|
|
@using BTCPayServer.Views.Notifications
|
2021-07-27 20:00:33 +02:00
|
|
|
@using BTCPayServer.Abstractions.Extensions
|
2022-01-13 09:08:15 +01:00
|
|
|
@model BTCPayServer.Components.Notifications.NotificationsViewModel
|
2020-06-24 10:23:16 +02:00
|
|
|
|
2021-12-11 04:32:23 +01:00
|
|
|
<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">
|
2022-06-09 18:25:05 +02:00
|
|
|
<div class="d-flex gap-3 align-items-center justify-content-between py-3 px-4 border-bottom border-light">
|
2021-01-07 01:07:42 -08:00
|
|
|
<h5 class="m-0">Notifications</h5>
|
2022-06-09 18:25:05 +02:00
|
|
|
<form id="notificationsForm" asp-controller="UINotifications" asp-action="MarkAllAsSeen" asp-route-returnUrl="@Model.ReturnUrl" method="post">
|
2021-04-07 19:37:35 -07:00
|
|
|
<button class="btn btn-link p-0" type="submit">Mark all as seen</button>
|
2021-01-07 01:07:42 -08:00
|
|
|
</form>
|
|
|
|
</div>
|
2022-01-13 09:08:15 +01:00
|
|
|
<partial name="Components/Notifications/List" model="Model"/>
|
|
|
|
<div class="p-3">
|
2022-01-07 12:32:00 +09:00
|
|
|
<a asp-controller="UINotifications" asp-action="Index">View all</a>
|
2021-01-07 01:07:42 -08:00
|
|
|
</div>
|
2020-06-24 10:23:16 +02:00
|
|
|
</div>
|
2021-12-11 04:32:23 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-01-07 12:32:00 +09:00
|
|
|
<a asp-controller="UINotifications" asp-action="Index" id="NotificationsHandle" class="mainMenuButton @ViewData.IsActiveCategory(typeof(NotificationsNavPages))" title="Notifications">
|
2021-12-11 04:32:23 +01:00
|
|
|
<vc:icon symbol="notifications" />
|
2020-06-24 10:23:16 +02:00
|
|
|
</a>
|
2021-12-11 04:32:23 +01:00
|
|
|
}
|
|
|
|
</div>
|