mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Use nameof() instead of strings
This commit is contained in:
@@ -60,11 +60,11 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
switch (sortOrderColumn)
|
||||
{
|
||||
case "Name":
|
||||
case nameof(app.AppName):
|
||||
return app.AppName;
|
||||
case "Store":
|
||||
case nameof(app.StoreName):
|
||||
return app.StoreName;
|
||||
case "AppType":
|
||||
case nameof(app.AppType):
|
||||
return app.AppType;
|
||||
default:
|
||||
return app.Id;
|
||||
|
||||
@@ -34,28 +34,28 @@
|
||||
<th>
|
||||
<a
|
||||
asp-action="ListApps"
|
||||
asp-route-sortOrder="@(ViewData["StoreSortOrder"] ?? "asc")"
|
||||
asp-route-sortOrderColumn="Store"
|
||||
asp-route-sortOrder="@(ViewData["StoreNameSortOrder"] ?? "asc")"
|
||||
asp-route-sortOrderColumn="StoreName"
|
||||
class="text-nowrap"
|
||||
title="@((string)ViewData["StoreSortOrder"] == "desc" ? "Sort by descending..." : "Sort by ascending...")"
|
||||
title="@((string)ViewData["StoreNameSortOrder"] == "desc" ? "Sort by descending..." : "Sort by ascending...")"
|
||||
>
|
||||
Store @if (ViewData["StoreSortOrder"] != null)
|
||||
Store @if (ViewData["StoreNameSortOrder"] != null)
|
||||
{
|
||||
<span class="fa @((string)ViewData["StoreSortOrder"] == "asc" ? "fa-arrow-down": "fa-arrow-up")" />
|
||||
<span class="fa @((string)ViewData["StoreNameSortOrder"] == "asc" ? "fa-arrow-down": "fa-arrow-up")" />
|
||||
}
|
||||
</a>
|
||||
</th>
|
||||
<th>
|
||||
<a
|
||||
asp-action="ListApps"
|
||||
asp-route-sortOrder="@(ViewData["NameSortOrder"] ?? "asc")"
|
||||
asp-route-sortOrderColumn="Name"
|
||||
asp-route-sortOrder="@(ViewData["AppNameSortOrder"] ?? "asc")"
|
||||
asp-route-sortOrderColumn="AppName"
|
||||
class="text-nowrap"
|
||||
title="@((string)ViewData["NameSortOrder"] == "desc" ? "Sort by descending..." : "Sort by ascending...")"
|
||||
title="@((string)ViewData["AppNameSortOrder"] == "desc" ? "Sort by descending..." : "Sort by ascending...")"
|
||||
>
|
||||
Name @if (ViewData["NameSortOrder"] != null)
|
||||
Name @if (ViewData["AppNameSortOrder"] != null)
|
||||
{
|
||||
<span class="fa @((string)ViewData["NameSortOrder"] == "asc" ? "fa-arrow-down": "fa-arrow-up")" />
|
||||
<span class="fa @((string)ViewData["AppNameSortOrder"] == "asc" ? "fa-arrow-down": "fa-arrow-up")" />
|
||||
}
|
||||
</a>
|
||||
</th>
|
||||
|
||||
Reference in New Issue
Block a user