From b6087c0f105c1a849aa041f8945f92473701b4af Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 20 Mar 2021 15:59:10 +0100 Subject: [PATCH] web: fix CodeMirror styles missing for SAML Source/Provider Signed-off-by: Jens Langhammer --- web/src/elements/CodeMirror.ts | 1 - web/src/elements/Tabs.ts | 1 - web/src/pages/providers/SAMLProviderViewPage.ts | 4 +++- web/src/pages/sources/SAMLSourceViewPage.ts | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/elements/CodeMirror.ts b/web/src/elements/CodeMirror.ts index ac80312f3..f7af8524e 100644 --- a/web/src/elements/CodeMirror.ts +++ b/web/src/elements/CodeMirror.ts @@ -1,6 +1,5 @@ import { customElement, LitElement, property } from "lit-element"; -// @ts-ignore import CodeMirror from "codemirror"; import "codemirror/addon/display/autorefresh"; import "codemirror/mode/xml/xml.js"; diff --git a/web/src/elements/Tabs.ts b/web/src/elements/Tabs.ts index fc599cada..ea6a25a01 100644 --- a/web/src/elements/Tabs.ts +++ b/web/src/elements/Tabs.ts @@ -17,7 +17,6 @@ export class Tabs extends LitElement { static get styles(): CSSResult[] { return [PFGlobal, PFTabs, AKGlobal, css` ::slotted(*) { - height: 100%; flex-grow: 2; } :host([vertical]) { diff --git a/web/src/pages/providers/SAMLProviderViewPage.ts b/web/src/pages/providers/SAMLProviderViewPage.ts index 9a70affe4..b4125b25c 100644 --- a/web/src/pages/providers/SAMLProviderViewPage.ts +++ b/web/src/pages/providers/SAMLProviderViewPage.ts @@ -12,6 +12,8 @@ import PFFlex from "@patternfly/patternfly/utilities/Flex/flex.css"; import PFDisplay from "@patternfly/patternfly/utilities/Display/display.css"; import AKGlobal from "../../authentik.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; +import CodeMirrorStyle from "codemirror/lib/codemirror.css"; +import CodeMirrorTheme from "codemirror/theme/monokai.css"; import "../../elements/buttons/ModalButton"; import "../../elements/buttons/SpinnerButton"; @@ -52,7 +54,7 @@ export class SAMLProviderViewPage extends Page { provider?: SAMLProvider; static get styles(): CSSResult[] { - return [PFBase, PFPage, PFFlex, PFDisplay, PFGallery, PFContent, PFCard, PFDescriptionList, PFSizing, AKGlobal]; + return [PFBase, PFPage, PFFlex, PFDisplay, PFGallery, PFContent, PFCard, PFDescriptionList, PFSizing,CodeMirrorStyle, CodeMirrorTheme, AKGlobal]; } constructor() { diff --git a/web/src/pages/sources/SAMLSourceViewPage.ts b/web/src/pages/sources/SAMLSourceViewPage.ts index 3f6b08770..3b2280f85 100644 --- a/web/src/pages/sources/SAMLSourceViewPage.ts +++ b/web/src/pages/sources/SAMLSourceViewPage.ts @@ -12,6 +12,8 @@ import PFFlex from "@patternfly/patternfly/utilities/Flex/flex.css"; import PFDisplay from "@patternfly/patternfly/utilities/Display/display.css"; import AKGlobal from "../../authentik.css"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; +import CodeMirrorStyle from "codemirror/lib/codemirror.css"; +import CodeMirrorTheme from "codemirror/theme/monokai.css"; import "../../elements/buttons/ModalButton"; import "../../elements/buttons/SpinnerButton"; @@ -48,7 +50,7 @@ export class SAMLSourceViewPage extends Page { source?: SAMLSource; static get styles(): CSSResult[] { - return [PFBase, PFPage, PFFlex, PFDisplay, PFGallery, PFContent, PFCard, PFDescriptionList, PFSizing, AKGlobal]; + return [PFBase, PFPage, PFFlex, PFDisplay, PFGallery, PFContent, PFCard, PFDescriptionList, PFSizing, CodeMirrorStyle, CodeMirrorTheme, AKGlobal]; } constructor() {