diff --git a/web/src/flow/FlowExecutor.ts b/web/src/flow/FlowExecutor.ts index 72be3ebadfc8..79a61b76c26a 100644 --- a/web/src/flow/FlowExecutor.ts +++ b/web/src/flow/FlowExecutor.ts @@ -5,7 +5,6 @@ import { TITLE_DEFAULT, } from "@goauthentik/common/constants"; import { globalAK } from "@goauthentik/common/global"; -import { purify } from "@goauthentik/common/purify"; import { configureSentry } from "@goauthentik/common/sentry"; import { first } from "@goauthentik/common/utils"; import { WebsocketClient } from "@goauthentik/common/ws"; @@ -14,6 +13,7 @@ import "@goauthentik/elements/LoadingOverlay"; import "@goauthentik/elements/ak-locale-context"; import { DefaultBrand } from "@goauthentik/elements/sidebar/SidebarBrand"; import { themeImage } from "@goauthentik/elements/utils/images"; +import "@goauthentik/flow/components/ak-brand-footer"; import "@goauthentik/flow/sources/apple/AppleLoginInit"; import "@goauthentik/flow/sources/plex/PlexLoginInit"; import "@goauthentik/flow/stages/FlowErrorStage"; @@ -516,25 +516,9 @@ export class FlowExecutor extends Interface implements StageHost { ${until(this.renderChallenge())} diff --git a/web/src/flow/components/ak-brand-footer.ts b/web/src/flow/components/ak-brand-footer.ts new file mode 100644 index 000000000000..03425edc649d --- /dev/null +++ b/web/src/flow/components/ak-brand-footer.ts @@ -0,0 +1,51 @@ +import { purify } from "@goauthentik/common/purify"; +import { AKElement } from "@goauthentik/elements/Base.js"; + +import { msg } from "@lit/localize"; +import { css, html } from "lit"; +import { customElement, property } from "lit/decorators.js"; +import { map } from "lit/directives/map.js"; + +import PFList from "@patternfly/patternfly/components/List/list.css"; +import PFBase from "@patternfly/patternfly/patternfly-base.css"; + +import { FooterLink } from "@goauthentik/api"; + +const styles = css` + .pf-c-list a { + color: unset; + } + ul.pf-c-list.pf-m-inline { + justify-content: center; + padding: calc(var(--pf-global--spacer--xs) / 2) 0px; + } +`; + +const salesMark: FooterLink = { name: msg("Powered by authentik"), href: "" }; + +@customElement("ak-brand-links") +export class BrandLinks extends AKElement { + static get styles() { + return [PFBase, PFList, styles]; + } + + @property({ type: Array, attribute: false }) + links: FooterLink[] = []; + + render() { + const links = [...(this.links ?? []), salesMark]; + return html` `; + } +} + +declare global { + interface HTMLElementTagNameMap { + "ak-brand-links": BrandLinks; + } +}