mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-20 07:24:25 +01:00
Attempt to fix bug of broken Mark as Seen button on deployed instances
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</a>
|
||||
}
|
||||
<a class="dropdown-item text-secondary" asp-controller="Notifications" asp-action="Index">See All</a>
|
||||
<form asp-controller="Notifications" asp-action="MarkAllAsSeen" asp-route-returnUrl="@Context.Request.GetDisplayUrl()" method="post">
|
||||
<form asp-controller="Notifications" asp-action="MarkAllAsSeen" asp-route-returnUrl="@Context.Request.GetCurrentPathWithQueryString()" method="post">
|
||||
<button class="dropdown-item text-secondary" type="submit"><i class="fa fa-eye"></i> Mark all as seen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -298,6 +298,10 @@ namespace BTCPayServer
|
||||
request.PathBase.ToUriComponent(),
|
||||
request.Path.ToUriComponent());
|
||||
}
|
||||
public static string GetCurrentPathWithQueryString(this HttpRequest request)
|
||||
{
|
||||
return request.PathBase + request.Path + request.QueryString;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If 'toto' and RootPath is 'rootpath' returns '/rootpath/toto'
|
||||
|
||||
Reference in New Issue
Block a user