diff --git a/web/Dockerfile b/web/Dockerfile index 1eb894cb1..53f4db235 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -2,8 +2,8 @@ FROM node as npm-builder COPY . /static/ -ENV NODE_ENV production -RUN cd /static && npm i && npm run build +ENV NODE_ENV=production +RUN cd /static && npm i --production=false && npm run build FROM nginx diff --git a/web/src/elements/Expand.ts b/web/src/elements/Expand.ts index 524eaf702..6fba66b58 100644 --- a/web/src/elements/Expand.ts +++ b/web/src/elements/Expand.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; 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") export class Expand extends LitElement { @@ -15,7 +15,7 @@ export class Expand extends LitElement { textClosed = "Show more"; static get styles(): CSSResult[] { - return COMMON_STYLES; + return [PFExpandableSection]; } render(): TemplateResult { diff --git a/web/src/flows/FlowExecutor.ts b/web/src/flows/FlowExecutor.ts index 8a8775064..a8559f90b 100644 --- a/web/src/flows/FlowExecutor.ts +++ b/web/src/flows/FlowExecutor.ts @@ -1,5 +1,11 @@ import { gettext } from "django"; 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 "./stages/authenticator_static/AuthenticatorStaticStage"; import "./stages/authenticator_totp/AuthenticatorTOTPStage"; @@ -66,6 +72,7 @@ export class FlowExecutor extends LitElement implements StageHost { this.addEventListener("ak-flow-submit", () => { this.submit(); }); + document.adoptedStyleSheets = [PFLogin, PFBackgroundImage, PFList, AKGlobal]; } submit(formData?: T): Promise {