From 0b6dd49f361cafd39db7e6547960eb7c1bb19d70 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 19 Oct 2022 10:11:12 +0200 Subject: [PATCH] web/admin: show oauth2 docs on oauth2 provider view page Signed-off-by: Jens Langhammer --- .../oauth2/OAuth2ProviderViewPage.ts | 366 +++++++++--------- 1 file changed, 176 insertions(+), 190 deletions(-) diff --git a/web/src/admin/providers/oauth2/OAuth2ProviderViewPage.ts b/web/src/admin/providers/oauth2/OAuth2ProviderViewPage.ts index e086f2b18..3567c933e 100644 --- a/web/src/admin/providers/oauth2/OAuth2ProviderViewPage.ts +++ b/web/src/admin/providers/oauth2/OAuth2ProviderViewPage.ts @@ -3,8 +3,10 @@ import "@goauthentik/admin/providers/oauth2/OAuth2ProviderForm"; import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; import { EVENT_REFRESH } from "@goauthentik/common/constants"; import { convertToTitle } from "@goauthentik/common/utils"; +import MDProviderOAuth2 from "@goauthentik/docs/providers/oauth2/index.md"; import { AKElement } from "@goauthentik/elements/Base"; import "@goauthentik/elements/CodeMirror"; +import "@goauthentik/elements/Markdown"; import "@goauthentik/elements/Tabs"; import "@goauthentik/elements/buttons/ModalButton"; import "@goauthentik/elements/buttons/SpinnerButton"; @@ -80,202 +82,186 @@ export class OAuth2ProviderViewPage extends AKElement { if (!this.provider) { return html``; } - return html` ${ - this.provider?.assignedApplicationName + return html` ${this.provider?.assignedApplicationName ? html`` : html`
${t`Warning: Provider is not used by an Application.`} -
` - } + `}
-
-
-
-
-
-
- ${t`Name`} -
-
-
- ${this.provider.name} -
-
-
-
-
- ${t`Assigned to application`} -
-
-
- -
-
-
-
-
- ${t`Client type`} -
-
-
- ${convertToTitle( - this.provider.clientType || "", - )} -
-
-
-
-
- ${t`Client ID`} -
-
-
- ${this.provider.clientId} -
-
-
-
-
- ${t`Redirect URIs`} -
-
-
- ${this.provider.redirectUris} -
-
-
-
-
- +
+
+
+
+
+ ${t`Name`} +
+
+
+ ${this.provider.name} +
+
-
-
-
-
-
-
- - -
-
- - -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
+
+
+ ${t`Assigned to application`} +
+
+
+ + +
+
-
+
+
+ ${t`Client type`} +
+
+
+ ${convertToTitle(this.provider.clientType || "")} +
+
+
+
+
+ ${t`Client ID`} +
+
+
+ ${this.provider.clientId} +
+
+
+
+
+ ${t`Redirect URIs`} +
+
+
+ ${this.provider.redirectUris} +
+
+
+
- - `; + +
+
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ +
+
+
`; } }