mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Remove Confirmed state in UI (#3090)
* Remove Confirmed state in UI Closes #1789. * Add infobox & improve refund tooltip * Update BTCPayServer/Views/Invoice/ListInvoices.cshtml Add @dennisreimann suggestion Co-authored-by: d11n <mail@dennisreimann.de> * Add "don't show again" button Adds a "Don't Show Again" button to the infobox. Also a bugfix that was preventing the new status from showing in the invoice details page. * Add User blob and move invoice status notice to it Co-authored-by: d11n <mail@dennisreimann.de> Co-authored-by: Kukks <evilkukka@gmail.com>
This commit is contained in:
@@ -85,6 +85,26 @@ namespace BTCPayServer.Controllers
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DisableShowInvoiceStatusChangeHint()
|
||||
{
|
||||
|
||||
var user = await _userManager.GetUserAsync(User);
|
||||
if (user == null)
|
||||
{
|
||||
throw new ApplicationException($"Unable to load user with ID '{_userManager.GetUserId(User)}'.");
|
||||
}
|
||||
|
||||
var blob = user.GetBlob();
|
||||
blob.ShowInvoiceStatusChangeHint = false;
|
||||
if (user.SetBlob(blob))
|
||||
{
|
||||
await _userManager.UpdateAsync(user);
|
||||
}
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Index(IndexViewModel model)
|
||||
|
||||
Reference in New Issue
Block a user