diff --git a/BTCPayServer/Views/Manage/AddApiKey.cshtml b/BTCPayServer/Views/Manage/AddApiKey.cshtml index 863111e46..339f15630 100644 --- a/BTCPayServer/Views/Manage/AddApiKey.cshtml +++ b/BTCPayServer/Views/Manage/AddApiKey.cshtml @@ -12,109 +12,97 @@

Generate a new api key to use BTCPay through its API.

-
-
-
-
-
-
- - - -
-
+ +
- @for (int i = 0; i < Model.PermissionValues.Count; i++) +
+ + + +
+ +
Permissions
+
+ @for (int i = 0; i < Model.PermissionValues.Count; i++) + { + @if (!Model.PermissionValues[i].Forbidden) { - @if (!Model.PermissionValues[i].Forbidden) + + @if (Policies.IsStorePolicy(Model.PermissionValues[i].Permission)) { - - @if (Policies.IsStorePolicy(Model.PermissionValues[i].Permission)) + + @if (Model.PermissionValues[i].StoreMode == ManageController.AddApiKeyViewModel.ApiKeyStoreMode.AllStores) { - - @if (Model.PermissionValues[i].StoreMode == ManageController.AddApiKeyViewModel.ApiKeyStoreMode.AllStores) - { -
-
- - - - - - @Model.PermissionValues[i].Description -
-
- } - else - { -
-
@Model.PermissionValues[i].Title
- @Model.PermissionValues[i].Description - -
- @if (!Model.Stores.Any()) - { -
- You currently have no stores configured. -
- } - @for (var index = 0; index < Model.PermissionValues[i].SpecificStores.Count; index++) - { -
-
-
-
- @if (Model.PermissionValues[i].SpecificStores[index] == null) - { - - } - else - { - var store = Model.Stores.SingleOrDefault(data => data.Id == Model.PermissionValues[i].SpecificStores[index]); - - } - - -
-
-
- - -
-
-
- } - @if (Model.PermissionValues[i].SpecificStores.Count < Model.Stores.Length) - { -
- -
- } - } - } - else - { -
+
- - + + + @Model.PermissionValues[i].Description
} + else + { +
+
@Model.PermissionValues[i].Title
+ @Model.PermissionValues[i].Description + + + @if (!Model.Stores.Any()) + { +

+ You currently have no stores configured. +

+ } + @for (var index = 0; index < Model.PermissionValues[i].SpecificStores.Count; index++) + { +
+ @if (Model.PermissionValues[i].SpecificStores[index] == null) + { + + } + else + { + var store = Model.Stores.SingleOrDefault(data => data.Id == Model.PermissionValues[i].SpecificStores[index]); + + } + +
+ +
+
+ } + @if (Model.PermissionValues[i].SpecificStores.Count < Model.Stores.Length) + { +
+ +
+ } +
+ } + } + else + { +
+
+ + + + @Model.PermissionValues[i].Description +
+
} } - - + }
-
+ + + @section Scripts { @await Html.PartialAsync("_ValidationScriptsPartial")