web: load missing flow css files and adopt them
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
5f024eb1f7
commit
67629ce0b7
|
@ -2,8 +2,8 @@ FROM node as npm-builder
|
||||||
|
|
||||||
COPY . /static/
|
COPY . /static/
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV=production
|
||||||
RUN cd /static && npm i && npm run build
|
RUN cd /static && npm i --production=false && npm run build
|
||||||
|
|
||||||
FROM nginx
|
FROM nginx
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { gettext } from "django";
|
import { gettext } from "django";
|
||||||
import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
|
import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
|
||||||
import { COMMON_STYLES } from "../common/styles";
|
import PFExpandableSection from "../../node_modules/@patternfly/patternfly/components/ExpandableSection/expandable-section.css";
|
||||||
|
|
||||||
@customElement("ak-expand")
|
@customElement("ak-expand")
|
||||||
export class Expand extends LitElement {
|
export class Expand extends LitElement {
|
||||||
|
@ -15,7 +15,7 @@ export class Expand extends LitElement {
|
||||||
textClosed = "Show more";
|
textClosed = "Show more";
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return COMMON_STYLES;
|
return [PFExpandableSection];
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): TemplateResult {
|
render(): TemplateResult {
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
import { gettext } from "django";
|
import { gettext } from "django";
|
||||||
import { LitElement, html, customElement, property, TemplateResult, CSSResult, css } from "lit-element";
|
import { LitElement, html, customElement, property, TemplateResult, CSSResult, css } from "lit-element";
|
||||||
|
|
||||||
|
import PFLogin from "../../node_modules/@patternfly/patternfly/components/Login/login.css";
|
||||||
|
import PFBackgroundImage from "../../node_modules/@patternfly/patternfly/components/BackgroundImage/background-image.css";
|
||||||
|
import PFList from "../../node_modules/@patternfly/patternfly/components/List/list.css";
|
||||||
|
import AKGlobal from "../authentik.css";
|
||||||
|
|
||||||
import { unsafeHTML } from "lit-html/directives/unsafe-html";
|
import { unsafeHTML } from "lit-html/directives/unsafe-html";
|
||||||
import "./stages/authenticator_static/AuthenticatorStaticStage";
|
import "./stages/authenticator_static/AuthenticatorStaticStage";
|
||||||
import "./stages/authenticator_totp/AuthenticatorTOTPStage";
|
import "./stages/authenticator_totp/AuthenticatorTOTPStage";
|
||||||
|
@ -66,6 +72,7 @@ export class FlowExecutor extends LitElement implements StageHost {
|
||||||
this.addEventListener("ak-flow-submit", () => {
|
this.addEventListener("ak-flow-submit", () => {
|
||||||
this.submit();
|
this.submit();
|
||||||
});
|
});
|
||||||
|
document.adoptedStyleSheets = [PFLogin, PFBackgroundImage, PFList, AKGlobal];
|
||||||
}
|
}
|
||||||
|
|
||||||
submit<T>(formData?: T): Promise<void> {
|
submit<T>(formData?: T): Promise<void> {
|
||||||
|
|
Reference in New Issue