mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-18 03:19:51 +03:00
0021e5fa25
* web/flows: fix bottom padding when loading challenge Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add base class that does layout for login cards Signed-off-by: Jens Langhammer <jens@goauthentik.io> * ok actually rework the whole thing Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix leftover div Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix other stages Signed-off-by: Jens Langhammer <jens@goauthentik.io> * better declare loading state Signed-off-by: Jens Langhammer <jens@goauthentik.io> * format Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import "@goauthentik/elements/EmptyState";
|
|
import "@goauthentik/flow/FormStatic";
|
|
import "@goauthentik/flow/components/ak-flow-card.js";
|
|
import { BaseStage } from "@goauthentik/flow/stages/base";
|
|
|
|
import { msg } from "@lit/localize";
|
|
import { TemplateResult, html } from "lit";
|
|
import { customElement } from "lit/decorators.js";
|
|
|
|
import { OAuthDeviceCodeFinishChallenge } from "@goauthentik/api";
|
|
|
|
@customElement("ak-flow-provider-oauth2-code-finish")
|
|
export class DeviceCodeFinish extends BaseStage<
|
|
OAuthDeviceCodeFinishChallenge,
|
|
OAuthDeviceCodeFinishChallenge
|
|
> {
|
|
render(): TemplateResult {
|
|
return html`<ak-flow-card .challenge=${this.challenge}>
|
|
<ak-empty-state icon="fas fa-check">
|
|
<span>${msg("You may close this page now.")}</span>
|
|
<span slot="body"> ${msg("You've successfully authenticated your device.")} </span>
|
|
</ak-empty-state>
|
|
</ak-flow-card>`;
|
|
}
|
|
}
|
|
|
|
declare global {
|
|
interface HTMLElementTagNameMap {
|
|
"ak-flow-provider-oauth2-code-finish": DeviceCodeFinish;
|
|
}
|
|
}
|