2020-06-15 01:22:09 -05:00
|
|
|
@inject BTCPayServer.Services.Notifications.NotificationManager notificationManager
|
2020-06-11 17:36:48 -05:00
|
|
|
|
|
|
|
@{
|
2020-06-17 11:26:21 +09:00
|
|
|
var notificationModel = await notificationManager.GetSummaryNotifications(User);
|
2020-06-11 17:36:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
@if (notificationModel.UnseenCount > 0)
|
|
|
|
{
|
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a class="nav-link js-scroll-trigger" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" id="Notifications">
|
|
|
|
<i class="fa fa-bell"></i>
|
|
|
|
</a>
|
|
|
|
<span class="alerts-badge badge badge-pill badge-danger">@notificationModel.UnseenCount</span>
|
|
|
|
<div class="dropdown-menu dropdown-menu-right text-center" aria-labelledby="navbarDropdown">
|
|
|
|
@foreach (var notif in notificationModel.Last5)
|
|
|
|
{
|
2020-06-23 03:06:02 +02:00
|
|
|
<a asp-action="NotificationPassThrough" asp-controller="Notifications" asp-route-id="@notif.Id" class="dropdown-item border-bottom">
|
2020-06-11 17:36:48 -05:00
|
|
|
<div class="text-left" style="width: 200px; white-space:normal;">
|
|
|
|
@notif.Body
|
|
|
|
</div>
|
|
|
|
<div class="text-left">
|
2020-06-22 09:32:51 +02:00
|
|
|
<small class="text-muted">@notif.Created.ToTimeAgo()</small>
|
2020-06-11 17:36:48 -05:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
}
|
|
|
|
<a class="dropdown-item text-info" asp-controller="Notifications" asp-action="Index">See All</a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<li class="nav-item">
|
|
|
|
<a asp-controller="Notifications" asp-action="Index" title="Notifications" class="nav-link js-scroll-trigger" id="Notifications"><i class="fa fa-bell"></i></a>
|
|
|
|
</li>
|
|
|
|
}
|