73733b20b6
* build(deps): bump @trivago/prettier-plugin-sort-imports in /web Bumps [@trivago/prettier-plugin-sort-imports](https://github.com/trivago/prettier-plugin-sort-imports) from 2.0.4 to 3.0.0. - [Release notes](https://github.com/trivago/prettier-plugin-sort-imports/releases) - [Changelog](https://github.com/trivago/prettier-plugin-sort-imports/blob/master/CHANGELOG.md) - [Commits](https://github.com/trivago/prettier-plugin-sort-imports/commits) --- updated-dependencies: - dependency-name: "@trivago/prettier-plugin-sort-imports" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * web: update prettier config Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
53 lines
2.1 KiB
TypeScript
53 lines
2.1 KiB
TypeScript
import { t } from "@lingui/macro";
|
|
|
|
import { CSSResult, TemplateResult, html } from "lit";
|
|
import { customElement } from "lit/decorators";
|
|
|
|
import AKGlobal from "../../authentik.css";
|
|
import PFForm from "@patternfly/patternfly/components/Form/form.css";
|
|
import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";
|
|
import PFList from "@patternfly/patternfly/components/List/list.css";
|
|
import PFLogin from "@patternfly/patternfly/components/Login/login.css";
|
|
import PFTitle from "@patternfly/patternfly/components/Title/title.css";
|
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
|
|
|
import { AccessDeniedChallenge, FlowChallengeResponseRequest } from "@goauthentik/api";
|
|
|
|
import "../../elements/EmptyState";
|
|
import { BaseStage } from "../stages/base";
|
|
|
|
@customElement("ak-stage-access-denied")
|
|
export class FlowAccessDenied extends BaseStage<
|
|
AccessDeniedChallenge,
|
|
FlowChallengeResponseRequest
|
|
> {
|
|
static get styles(): CSSResult[] {
|
|
return [PFBase, PFLogin, PFForm, PFList, PFFormControl, PFTitle, AKGlobal];
|
|
}
|
|
|
|
render(): TemplateResult {
|
|
if (!this.challenge) {
|
|
return html`<ak-empty-state ?loading="${true}" header=${t`Loading`}> </ak-empty-state>`;
|
|
}
|
|
return html`<header class="pf-c-login__main-header">
|
|
<h1 class="pf-c-title pf-m-3xl">${this.challenge.flowInfo?.title}</h1>
|
|
</header>
|
|
<div class="pf-c-login__main-body">
|
|
<form method="POST" class="pf-c-form">
|
|
<div class="pf-c-form__group">
|
|
<p>
|
|
<i class="pf-icon pf-icon-error-circle-o"></i>
|
|
${t`Request has been denied.`}
|
|
</p>
|
|
${this.challenge?.errorMessage &&
|
|
html`<hr />
|
|
<p>${this.challenge.errorMessage}</p>`}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<footer class="pf-c-login__main-footer">
|
|
<ul class="pf-c-login__main-footer-links"></ul>
|
|
</footer>`;
|
|
}
|
|
}
|