From 5f0192ee48c28de5c07087bd170e184bf13b710c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 17 Mar 2021 18:38:39 +0100 Subject: [PATCH] web: fix dark mode for admin overview page Signed-off-by: Jens Langhammer --- web/src/elements/buttons/ModalButton.ts | 3 ++- web/src/elements/cards/AggregateCard.ts | 3 ++- web/src/pages/admin-overview/AdminOverviewPage.ts | 3 ++- web/src/pages/admin-overview/TopApplicationsTable.ts | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/web/src/elements/buttons/ModalButton.ts b/web/src/elements/buttons/ModalButton.ts index 1e2953c9e..45bf43954 100644 --- a/web/src/elements/buttons/ModalButton.ts +++ b/web/src/elements/buttons/ModalButton.ts @@ -11,6 +11,7 @@ import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFStack from "@patternfly/patternfly/layouts/Stack/stack.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; +import AKGlobal from "../../authentik.css" import { convertToSlug } from "../../utils"; import { SpinnerButton } from "./SpinnerButton"; @@ -29,7 +30,7 @@ export class ModalButton extends LitElement { modal = ""; static get styles(): CSSResult[] { - return [PFBase, PFButton, PFModalBox, PFForm, PFFormControl, PFBullseye, PFBackdrop, PFPage, PFStack, PFCard, PFContent].concat( + return [PFBase, PFButton, PFModalBox, PFForm, PFFormControl, PFBullseye, PFBackdrop, PFPage, PFStack, PFCard, PFContent, AKGlobal].concat( css` :host { text-align: left; diff --git a/web/src/elements/cards/AggregateCard.ts b/web/src/elements/cards/AggregateCard.ts index 6a2cd6cc8..73c1e520a 100644 --- a/web/src/elements/cards/AggregateCard.ts +++ b/web/src/elements/cards/AggregateCard.ts @@ -4,6 +4,7 @@ import { ifDefined } from "lit-html/directives/if-defined"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFCard from "@patternfly/patternfly/components/Card/card.css"; import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css"; +import AKGlobal from "../../authentik.css" @customElement("ak-aggregate-card") export class AggregateCard extends LitElement { @@ -17,7 +18,7 @@ export class AggregateCard extends LitElement { headerLink?: string; static get styles(): CSSResult[] { - return [PFBase, PFCard, PFFlex].concat([css` + return [PFBase, PFCard, PFFlex, AKGlobal].concat([css` .pf-c-card.pf-c-card-aggregate { height: 100%; } diff --git a/web/src/pages/admin-overview/AdminOverviewPage.ts b/web/src/pages/admin-overview/AdminOverviewPage.ts index c2a031a92..0fb2cc81c 100644 --- a/web/src/pages/admin-overview/AdminOverviewPage.ts +++ b/web/src/pages/admin-overview/AdminOverviewPage.ts @@ -16,12 +16,13 @@ import "./cards/WorkerStatusCard"; import PFPage from "@patternfly/patternfly/components/Page/page.css"; import PFContent from "@patternfly/patternfly/components/Content/content.css"; import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css"; +import AKGlobal from "../../authentik.css" @customElement("ak-admin-overview") export class AdminOverviewPage extends LitElement { static get styles(): CSSResult[] { - return [PFGallery, PFPage, PFContent]; + return [PFGallery, PFPage, PFContent, AKGlobal]; } render(): TemplateResult { diff --git a/web/src/pages/admin-overview/TopApplicationsTable.ts b/web/src/pages/admin-overview/TopApplicationsTable.ts index d20bfcaec..cb35db577 100644 --- a/web/src/pages/admin-overview/TopApplicationsTable.ts +++ b/web/src/pages/admin-overview/TopApplicationsTable.ts @@ -2,6 +2,7 @@ import { gettext } from "django"; import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; import { EventsApi, EventTopPerUser } from "authentik-api"; import PFTable from "@patternfly/patternfly/components/Table/table.css"; +import AKGlobal from "../../authentik.css" import "../../elements/Spinner"; import { DEFAULT_CONFIG } from "../../api/Config"; @@ -13,7 +14,7 @@ export class TopApplicationsTable extends LitElement { topN?: EventTopPerUser[]; static get styles(): CSSResult[] { - return [PFTable]; + return [PFTable, AKGlobal]; } firstUpdated(): void {