From 93e8f9cb36d290f5e4c1770db58b76d6dee258f2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 17 Mar 2021 19:49:08 +0100 Subject: [PATCH] web: fix notification drawer, add button to show event Signed-off-by: Jens Langhammer --- web/rollup.config.js | 3 +++ .../elements/notifications/NotificationDrawer.ts | 13 ++++++++++--- web/src/pages/events/EventInfoPage.ts | 3 ++- web/src/pages/flows/FlowViewPage.ts | 5 +++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/web/rollup.config.js b/web/rollup.config.js index e60d4e963..f7fe7192d 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -20,6 +20,9 @@ const isProdBuild = process.env.NODE_ENV === "production"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function manualChunks(id) { if (id.includes("node_modules")) { + if (id.includes("codemirror")) { + return "vendor-cm"; + } return "vendor"; } } diff --git a/web/src/elements/notifications/NotificationDrawer.ts b/web/src/elements/notifications/NotificationDrawer.ts index e8e301db7..f256b3fe4 100644 --- a/web/src/elements/notifications/NotificationDrawer.ts +++ b/web/src/elements/notifications/NotificationDrawer.ts @@ -6,6 +6,8 @@ import { DEFAULT_CONFIG } from "../../api/Config"; import PFBase from "@patternfly/patternfly/patternfly-base.css"; import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css"; import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css"; +import AKGlobal from "../../authentik.css"; +import PFContent from "@patternfly/patternfly/components/Content/content.css"; @customElement("ak-notification-drawer") export class NotificationDrawer extends LitElement { @@ -17,7 +19,7 @@ export class NotificationDrawer extends LitElement { unread = 0; static get styles(): CSSResult[] { - return [PFBase, PFNotificationDrawer, PFDropdown].concat( + return [PFBase, PFNotificationDrawer, PFContent, PFDropdown, AKGlobal].concat( css` .pf-c-notification-drawer__header { height: 114px; @@ -57,9 +59,9 @@ export class NotificationDrawer extends LitElement { default: break; } - return html`
  • + return html`
  • - +

    @@ -67,6 +69,11 @@ export class NotificationDrawer extends LitElement {

    + ${item.event && html` + + + + `}