diff --git a/web/src/pages/providers/ProviderViewPage.ts b/web/src/pages/providers/ProviderViewPage.ts
index f033dd5cf..e33db851a 100644
--- a/web/src/pages/providers/ProviderViewPage.ts
+++ b/web/src/pages/providers/ProviderViewPage.ts
@@ -2,6 +2,7 @@ import { css, CSSResult, customElement, html, LitElement, property, TemplateResu
import "../../elements/buttons/SpinnerButton";
import "../../elements/EmptyState";
+import "../../elements/PageHeader";
import "./saml/SAMLProviderViewPage";
import "./oauth2/OAuth2ProviderViewPage";
@@ -31,7 +32,7 @@ export class ProviderViewPage extends LitElement {
`];
}
- render(): TemplateResult {
+ renderProvider(): TemplateResult {
if (!this.provider) {
return html`
`;
}
@@ -46,4 +47,13 @@ export class ProviderViewPage extends LitElement {
return html`
Invalid provider type ${this.provider?.component}
`;
}
}
+
+ render(): TemplateResult {
+ return html`
+
+ ${this.renderProvider()}`;
+ }
}
diff --git a/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts b/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
index f68d3909f..bd513cff6 100644
--- a/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
+++ b/web/src/pages/providers/oauth2/OAuth2ProviderViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import PFButton from "@patternfly/patternfly/components/Button/button.css";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
@@ -21,23 +21,13 @@ import "../../../elements/Tabs";
import "../../../elements/events/ObjectChangelog";
import "../RelatedApplicationButton";
import "./OAuth2ProviderForm";
-import { Page } from "../../../elements/Page";
import { convertToTitle } from "../../../utils";
import { OAuth2Provider, OAuth2ProviderSetupURLs, ProvidersApi } from "authentik-api";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { EVENT_REFRESH } from "../../../constants";
@customElement("ak-provider-oauth2-view")
-export class OAuth2ProviderViewPage extends Page {
- pageTitle(): string {
- return t`OAuth Provider ${this.provider?.name || ""}`;
- }
- pageDescription(): string | undefined {
- return;
- }
- pageIcon(): string {
- return "pf-icon pf-icon-integration";
- }
+export class OAuth2ProviderViewPage extends LitElement {
@property({type: Number})
set providerID(value: number) {
@@ -72,7 +62,7 @@ export class OAuth2ProviderViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
if (!this.provider) {
return html``;
}
diff --git a/web/src/pages/providers/proxy/ProxyProviderViewPage.ts b/web/src/pages/providers/proxy/ProxyProviderViewPage.ts
index ed66f2d09..38229fefe 100644
--- a/web/src/pages/providers/proxy/ProxyProviderViewPage.ts
+++ b/web/src/pages/providers/proxy/ProxyProviderViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import PFButton from "@patternfly/patternfly/components/Button/button.css";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
@@ -19,22 +19,12 @@ import "../../../elements/Tabs";
import "../../../elements/events/ObjectChangelog";
import "../RelatedApplicationButton";
import "./ProxyProviderForm";
-import { Page } from "../../../elements/Page";
import { ProvidersApi, ProxyProvider } from "authentik-api";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { EVENT_REFRESH } from "../../../constants";
@customElement("ak-provider-proxy-view")
-export class ProxyProviderViewPage extends Page {
- pageTitle(): string {
- return t`Proxy Provider ${this.provider?.name || ""}`;
- }
- pageDescription(): string | undefined {
- return;
- }
- pageIcon(): string {
- return "pf-icon pf-icon-integration";
- }
+export class ProxyProviderViewPage extends LitElement {
@property()
set args(value: { [key: string]: number }) {
@@ -63,7 +53,7 @@ export class ProxyProviderViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
if (!this.provider) {
return html``;
}
diff --git a/web/src/pages/providers/saml/SAMLProviderViewPage.ts b/web/src/pages/providers/saml/SAMLProviderViewPage.ts
index 62166bcf4..74e656b27 100644
--- a/web/src/pages/providers/saml/SAMLProviderViewPage.ts
+++ b/web/src/pages/providers/saml/SAMLProviderViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import { until } from "lit-html/directives/until";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
@@ -20,23 +20,13 @@ import "../../../elements/Tabs";
import "../../../elements/events/ObjectChangelog";
import "../RelatedApplicationButton";
import "./SAMLProviderForm";
-import { Page } from "../../../elements/Page";
import { ProvidersApi, SAMLProvider } from "authentik-api";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { EVENT_REFRESH } from "../../../constants";
import { ifDefined } from "lit-html/directives/if-defined";
@customElement("ak-provider-saml-view")
-export class SAMLProviderViewPage extends Page {
- pageTitle(): string {
- return t`SAML Provider ${this.provider?.name || ""}`;
- }
- pageDescription(): string | undefined {
- return;
- }
- pageIcon(): string {
- return "pf-icon pf-icon-integration";
- }
+export class SAMLProviderViewPage extends LitElement {
@property()
set args(value: { [key: string]: number }) {
@@ -65,7 +55,7 @@ export class SAMLProviderViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
if (!this.provider) {
return html``;
}
diff --git a/web/src/pages/sources/SourceViewPage.ts b/web/src/pages/sources/SourceViewPage.ts
index b9d32df1b..4dcab9ab6 100644
--- a/web/src/pages/sources/SourceViewPage.ts
+++ b/web/src/pages/sources/SourceViewPage.ts
@@ -4,10 +4,12 @@ import { DEFAULT_CONFIG } from "../../api/Config";
import "../../elements/buttons/SpinnerButton";
import "../../elements/EmptyState";
+import "../../elements/PageHeader";
import "./ldap/LDAPSourceViewPage";
import "./oauth/OAuthSourceViewPage";
import "./saml/SAMLSourceViewPage";
+import { ifDefined } from "lit-html/directives/if-defined";
@customElement("ak-source-view")
export class SourceViewPage extends LitElement {
@@ -32,7 +34,7 @@ export class SourceViewPage extends LitElement {
`];
}
- render(): TemplateResult {
+ renderSource(): TemplateResult {
if (!this.source) {
return html`
`;
}
@@ -47,4 +49,13 @@ export class SourceViewPage extends LitElement {
return html`
Invalid source type ${this.source.component}
`;
}
}
+
+ render(): TemplateResult {
+ return html`
+
+ ${this.renderSource()}`;
+ }
}
diff --git a/web/src/pages/sources/ldap/LDAPSourceViewPage.ts b/web/src/pages/sources/ldap/LDAPSourceViewPage.ts
index 782843f56..478b9ac9d 100644
--- a/web/src/pages/sources/ldap/LDAPSourceViewPage.ts
+++ b/web/src/pages/sources/ldap/LDAPSourceViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
@@ -20,23 +20,13 @@ import "../../../elements/Tabs";
import "../../../elements/events/ObjectChangelog";
import "../../../elements/forms/ModalForm";
import "./LDAPSourceForm";
-import { Page } from "../../../elements/Page";
import { until } from "lit-html/directives/until";
import { LDAPSource, SourcesApi, TaskStatusEnum } from "authentik-api";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { EVENT_REFRESH } from "../../../constants";
@customElement("ak-source-ldap-view")
-export class LDAPSourceViewPage extends Page {
- pageTitle(): string {
- return t`LDAP Source ${this.source?.name || ""}`;
- }
- pageDescription(): string | undefined {
- return;
- }
- pageIcon(): string {
- return "pf-icon pf-icon-middleware";
- }
+export class LDAPSourceViewPage extends LitElement {
@property({ type: String })
set sourceSlug(slug: string) {
@@ -62,7 +52,7 @@ export class LDAPSourceViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
if (!this.source) {
return html``;
}
diff --git a/web/src/pages/sources/oauth/OAuthSourceViewPage.ts b/web/src/pages/sources/oauth/OAuthSourceViewPage.ts
index 77c0ed5c2..703ece404 100644
--- a/web/src/pages/sources/oauth/OAuthSourceViewPage.ts
+++ b/web/src/pages/sources/oauth/OAuthSourceViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
@@ -20,22 +20,12 @@ import "../../../elements/events/ObjectChangelog";
import "../../../elements/forms/ModalForm";
import "../../policies/BoundPoliciesList";
import "./OAuthSourceForm";
-import { Page } from "../../../elements/Page";
import { OAuthSource, SourcesApi } from "authentik-api";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { EVENT_REFRESH } from "../../../constants";
@customElement("ak-source-oauth-view")
-export class OAuthSourceViewPage extends Page {
- pageTitle(): string {
- return t`OAuth Source ${this.source?.name || ""}`;
- }
- pageDescription(): string | undefined {
- return;
- }
- pageIcon(): string {
- return "pf-icon pf-icon-middleware";
- }
+export class OAuthSourceViewPage extends LitElement {
@property({ type: String })
set sourceSlug(value: string) {
@@ -61,7 +51,7 @@ export class OAuthSourceViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
if (!this.source) {
return html``;
}
diff --git a/web/src/pages/sources/saml/SAMLSourceViewPage.ts b/web/src/pages/sources/saml/SAMLSourceViewPage.ts
index 5fd3e65ac..aefce2c6b 100644
--- a/web/src/pages/sources/saml/SAMLSourceViewPage.ts
+++ b/web/src/pages/sources/saml/SAMLSourceViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import { until } from "lit-html/directives/until";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
@@ -21,7 +21,6 @@ import "../../../elements/events/ObjectChangelog";
import "../../../elements/forms/ModalForm";
import "../../policies/BoundPoliciesList";
import "./SAMLSourceForm";
-import { Page } from "../../../elements/Page";
import { SAMLSource, SourcesApi } from "authentik-api";
import { DEFAULT_CONFIG } from "../../../api/Config";
import { AppURLManager } from "../../../api/legacy";
@@ -29,16 +28,7 @@ import { EVENT_REFRESH } from "../../../constants";
import { ifDefined } from "lit-html/directives/if-defined";
@customElement("ak-source-saml-view")
-export class SAMLSourceViewPage extends Page {
- pageTitle(): string {
- return t`SAML Source ${this.source?.name || ""}`;
- }
- pageDescription(): string | undefined {
- return;
- }
- pageIcon(): string {
- return "pf-icon pf-icon-integration";
- }
+export class SAMLSourceViewPage extends LitElement {
@property({ type: String })
set sourceSlug(slug: string) {
@@ -64,7 +54,7 @@ export class SAMLSourceViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
if (!this.source) {
return html``;
}
diff --git a/web/src/pages/user-settings/UserSettingsPage.ts b/web/src/pages/user-settings/UserSettingsPage.ts
index 5ae117b04..d61b3e158 100644
--- a/web/src/pages/user-settings/UserSettingsPage.ts
+++ b/web/src/pages/user-settings/UserSettingsPage.ts
@@ -18,6 +18,7 @@ import { DEFAULT_CONFIG } from "../../api/Config";
import { until } from "lit-html/directives/until";
import { ifDefined } from "lit-html/directives/if-defined";
import "../../elements/Tabs";
+import "../../elements/PageHeader";
import "./tokens/UserTokenList";
import "./UserDetailsPage";
import "./settings/UserSettingsAuthenticatorTOTP";
@@ -65,15 +66,11 @@ export class UserSettingsPage extends LitElement {
render(): TemplateResult {
return html`
-
-
-
-
- ${t`User Settings`}
-
-
${t`Configure settings relevant to your user profile.`}
-
-
+
+
diff --git a/web/src/pages/users/UserViewPage.ts b/web/src/pages/users/UserViewPage.ts
index 3bd9095c7..2da02f1cc 100644
--- a/web/src/pages/users/UserViewPage.ts
+++ b/web/src/pages/users/UserViewPage.ts
@@ -1,5 +1,5 @@
import { t } from "@lingui/macro";
-import { CSSResult, customElement, html, property, TemplateResult } from "lit-element";
+import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
import PFPage from "@patternfly/patternfly/components/Page/page.css";
import PFContent from "@patternfly/patternfly/components/Content/content.css";
@@ -24,7 +24,7 @@ import "../../elements/user/UserConsentList";
import "../../elements/oauth/UserCodeList";
import "../../elements/oauth/UserRefreshList";
import "../../elements/charts/UserChart";
-import { Page } from "../../elements/Page";
+import "../../elements/PageHeader";
import { CoreApi, User } from "authentik-api";
import { DEFAULT_CONFIG } from "../../api/Config";
import { EVENT_REFRESH } from "../../constants";
@@ -33,16 +33,7 @@ import { MessageLevel } from "../../elements/messages/Message";
import { PFColor } from "../../elements/Label";
@customElement("ak-user-view")
-export class UserViewPage extends Page {
- pageTitle(): string {
- return t`User ${this.user?.username || ""}`;
- }
- pageDescription(): string | undefined {
- return this.user?.name || "";
- }
- pageIcon(): string {
- return "pf-icon pf-icon-user";
- }
+export class UserViewPage extends LitElement {
@property({ type: Number })
set userId(id: number) {
@@ -68,7 +59,16 @@ export class UserViewPage extends Page {
});
}
- renderContent(): TemplateResult {
+ render(): TemplateResult {
+ return html`
+
+ ${this.renderBody()}`;
+ }
+
+ renderBody(): TemplateResult {
if (!this.user) {
return html``;
}