From 7c71c52791a8769c58f213ccab3d3439e653af47 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 16 Dec 2021 12:23:30 +0100 Subject: [PATCH] web/admin: add sidebar to applications Signed-off-by: Jens Langhammer --- web/src/locales/en.po | 4 ++++ web/src/locales/fr_FR.po | 4 ++++ web/src/locales/pseudo-LOCALE.po | 4 ++++ .../pages/applications/ApplicationListPage.ts | 15 ++++++++++++++ website/docs/core/applications.md | 20 +++++++++---------- 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 7ef86c531..5a9f61641 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -122,6 +122,10 @@ msgstr "API Token (can be used to access the API programmatically)" msgid "API request failed" msgstr "API request failed" +#: src/pages/applications/ApplicationListPage.ts +msgid "About applications" +msgstr "About applications" + #: src/pages/sources/oauth/OAuthSourceViewPage.ts msgid "Access Key" msgstr "Access Key" diff --git a/web/src/locales/fr_FR.po b/web/src/locales/fr_FR.po index 7838b5efb..93ca08a80 100644 --- a/web/src/locales/fr_FR.po +++ b/web/src/locales/fr_FR.po @@ -128,6 +128,10 @@ msgstr "Jeton d'API (peut être utilisé pour accéder à l'API via un programme msgid "API request failed" msgstr "Requête d'API échouée" +#: src/pages/applications/ApplicationListPage.ts +msgid "About applications" +msgstr "" + #: src/pages/sources/oauth/OAuthSourceViewPage.ts msgid "Access Key" msgstr "Clé d'accès" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index b024d7e92..521ef15f6 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -122,6 +122,10 @@ msgstr "" msgid "API request failed" msgstr "" +#: src/pages/applications/ApplicationListPage.ts +msgid "About applications" +msgstr "" + #: src/pages/sources/oauth/OAuthSourceViewPage.ts msgid "Access Key" msgstr "" diff --git a/web/src/pages/applications/ApplicationListPage.ts b/web/src/pages/applications/ApplicationListPage.ts index b408ffd54..007f03810 100644 --- a/web/src/pages/applications/ApplicationListPage.ts +++ b/web/src/pages/applications/ApplicationListPage.ts @@ -5,12 +5,15 @@ import { customElement, property } from "lit/decorators.js"; import { ifDefined } from "lit/directives/if-defined.js"; import PFAvatar from "@patternfly/patternfly/components/Avatar/avatar.css"; +import PFCard from "@patternfly/patternfly/components/Card/card.css"; import { Application, CoreApi } from "@goauthentik/api"; +import MDApplication from "../../../../website/docs/core/applications.md"; import { AKResponse } from "../../api/Client"; import { DEFAULT_CONFIG } from "../../api/Config"; import { uiConfig } from "../../common/config"; +import "../../elements/Markdown"; import "../../elements/buttons/SpinnerButton"; import "../../elements/forms/DeleteBulkForm"; import "../../elements/forms/ModalForm"; @@ -52,6 +55,7 @@ export class ApplicationListPage extends TablePage { static get styles(): CSSResult[] { return super.styles.concat( PFAvatar, + PFCard, css` tr td:first-child { width: auto; @@ -74,6 +78,17 @@ export class ApplicationListPage extends TablePage { ]; } + renderSidebarAfter(): TemplateResult { + return html`
+
+
${t`About applications`}
+
+ +
+
+
`; + } + renderToolbarSelected(): TemplateResult { const disabled = this.selectedElements.length < 1; return html`