From 262ba6ee1e4ddd278557915caba53894a459dd4d Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Fri, 11 Dec 2020 12:44:55 +0900 Subject: [PATCH] Add links to API documentation for better discovery --- BTCPayServer/Views/Home/SwaggerDocs.cshtml | 2 + BTCPayServer/Views/Manage/APIKeys.cshtml | 87 +++++++++++----------- BTCPayServer/Views/Manage/_Nav.cshtml | 20 ++--- 3 files changed, 56 insertions(+), 53 deletions(-) diff --git a/BTCPayServer/Views/Home/SwaggerDocs.cshtml b/BTCPayServer/Views/Home/SwaggerDocs.cshtml index 3fe3e04ba..63ebc05df 100644 --- a/BTCPayServer/Views/Home/SwaggerDocs.cshtml +++ b/BTCPayServer/Views/Home/SwaggerDocs.cshtml @@ -22,6 +22,8 @@ + @*Ignore this, this is for making the test ClickOnAllSideMenus happy*@ + diff --git a/BTCPayServer/Views/Manage/APIKeys.cshtml b/BTCPayServer/Views/Manage/APIKeys.cshtml index de40d4c50..42d422cbd 100644 --- a/BTCPayServer/Views/Manage/APIKeys.cshtml +++ b/BTCPayServer/Views/Manage/APIKeys.cshtml @@ -4,54 +4,55 @@ ViewData.SetActivePageAndTitle(ManageNavPages.APIKeys, "Manage your API Keys"); } - + +

The BTCPay Server Greenfield API offers programmatic access to your instance. You can manage your BTCPay Server (e.g. stores, invoices, users) as well as automate workflows and integrations (see some use case examples). For that you need the API keys, which can be generated here. Find more information in the API authentication docs.

- - - - - - + + + + + + - @foreach (var keyData in Model.ApiKeyDatas) - { - - - - - - - } - @if (!Model.ApiKeyDatas.Any()) - { - - - - } + @foreach (var keyData in Model.ApiKeyDatas) + { + + + + + + + } + @if (!Model.ApiKeyDatas.Any()) + { + + + + }
LabelKeyPermissionsActions
LabelKeyPermissionsActions
@keyData.Label@keyData.Id - @{ - var permissions = keyData.GetBlob().Permissions; - } - @if (!permissions.Any()) - { - No permissions - } - else - { -
    - @foreach (var permission in Permission.ToPermissions(permissions).Select(c => c.ToString()).Distinct().ToArray()) - { -
  • @permission
  • - } -
- } -
- Remove -
- No API keys -
@keyData.Label@keyData.Id + @{ + var permissions = keyData.GetBlob().Permissions; + } + @if (!permissions.Any()) + { + No permissions + } + else + { +
    + @foreach (var permission in Permission.ToPermissions(permissions).Select(c => c.ToString()).Distinct().ToArray()) + { +
  • @permission
  • + } +
+ } +
+ Remove +
+ No API keys +
diff --git a/BTCPayServer/Views/Manage/_Nav.cshtml b/BTCPayServer/Views/Manage/_Nav.cshtml index 294f66f3e..9ed1fadc2 100644 --- a/BTCPayServer/Views/Manage/_Nav.cshtml +++ b/BTCPayServer/Views/Manage/_Nav.cshtml @@ -1,12 +1,12 @@ -@inject SignInManager SignInManager +@inject SignInManager SignInManager - +