mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Renaming Notice to Notification
Longer, but what can we do...
This commit is contained in:
@@ -3,8 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Events.Notifications;
|
||||
using BTCPayServer.Filters;
|
||||
using BTCPayServer.Models.NoticeViewModels;
|
||||
using BTCPayServer.Models.NotificationViewModels;
|
||||
using BTCPayServer.Security;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -12,11 +13,17 @@ using Microsoft.AspNetCore.Mvc;
|
||||
namespace BTCPayServer.Controllers
|
||||
{
|
||||
[BitpayAPIConstraint(false)]
|
||||
public class NoticeController : Controller
|
||||
{
|
||||
[HttpGet]
|
||||
[Route("notices")]
|
||||
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)]
|
||||
public class NotificationController : Controller
|
||||
{
|
||||
private readonly EventAggregator _eventAggregator;
|
||||
|
||||
public NotificationController(EventAggregator eventAggregator)
|
||||
{
|
||||
_eventAggregator = eventAggregator;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Index(int skip = 0, int count = 50, int timezoneOffset = 0)
|
||||
{
|
||||
var model = new IndexViewModel()
|
||||
@@ -70,5 +77,12 @@ namespace BTCPayServer.Controllers
|
||||
model.Items = model.Items.OrderByDescending(a => a.Created).ToList();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Generate()
|
||||
{
|
||||
_eventAggregator.NoticeNewVersion("1.1.1");
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer.Models.NoticeViewModels
|
||||
namespace BTCPayServer.Models.NotificationViewModels
|
||||
{
|
||||
public class IndexViewModel
|
||||
{
|
||||
@@ -1 +0,0 @@
|
||||
@using BTCPayServer.Models.NoticeViewModels
|
||||
@@ -1,4 +1,4 @@
|
||||
@model BTCPayServer.Models.NoticeViewModels.IndexViewModel
|
||||
@model BTCPayServer.Models.NotificationViewModels.IndexViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Notices";
|
||||
}
|
||||
1
BTCPayServer/Views/Notification/_ViewImports.cshtml
Normal file
1
BTCPayServer/Views/Notification/_ViewImports.cshtml
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<a asp-area="" asp-controller="Manage" asp-action="Index" title="My settings" class="nav-link js-scroll-trigger" id="MySettings"><i class="fa fa-user"></i></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a asp-area="" asp-controller="Notices" asp-action="Index" title="Notices" class="nav-link js-scroll-trigger" id="Notices"><i class="fa fa-bell"></i></a>
|
||||
<a asp-area="" asp-controller="Notification" asp-action="Index" title="Notifications" class="nav-link js-scroll-trigger" id="Notifications"><i class="fa fa-bell"></i></a>
|
||||
<span class="alerts-badge badge badge-pill badge-danger">6</span>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
|
||||
Reference in New Issue
Block a user