web: fix notification drawer, add button to show event
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
04d2e769bb
commit
93e8f9cb36
|
@ -20,6 +20,9 @@ const isProdBuild = process.env.NODE_ENV === "production";
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||||
function manualChunks(id) {
|
function manualChunks(id) {
|
||||||
if (id.includes("node_modules")) {
|
if (id.includes("node_modules")) {
|
||||||
|
if (id.includes("codemirror")) {
|
||||||
|
return "vendor-cm";
|
||||||
|
}
|
||||||
return "vendor";
|
return "vendor";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css";
|
import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css";
|
||||||
import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.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")
|
@customElement("ak-notification-drawer")
|
||||||
export class NotificationDrawer extends LitElement {
|
export class NotificationDrawer extends LitElement {
|
||||||
|
@ -17,7 +19,7 @@ export class NotificationDrawer extends LitElement {
|
||||||
unread = 0;
|
unread = 0;
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [PFBase, PFNotificationDrawer, PFDropdown].concat(
|
return [PFBase, PFNotificationDrawer, PFContent, PFDropdown, AKGlobal].concat(
|
||||||
css`
|
css`
|
||||||
.pf-c-notification-drawer__header {
|
.pf-c-notification-drawer__header {
|
||||||
height: 114px;
|
height: 114px;
|
||||||
|
@ -57,9 +59,9 @@ export class NotificationDrawer extends LitElement {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return html`<li class="pf-c-notification-drawer__list-item pf-m-read ${level}">
|
return html`<li class="pf-c-notification-drawer__list-item pf-m-read">
|
||||||
<div class="pf-c-notification-drawer__list-item-header">
|
<div class="pf-c-notification-drawer__list-item-header">
|
||||||
<span class="pf-c-notification-drawer__list-item-header-icon">
|
<span class="pf-c-notification-drawer__list-item-header-icon ${level}">
|
||||||
<i class="fas fa-info-circle" aria-hidden="true"></i>
|
<i class="fas fa-info-circle" aria-hidden="true"></i>
|
||||||
</span>
|
</span>
|
||||||
<h2 class="pf-c-notification-drawer__list-item-header-title">
|
<h2 class="pf-c-notification-drawer__list-item-header-title">
|
||||||
|
@ -67,6 +69,11 @@ export class NotificationDrawer extends LitElement {
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="pf-c-notification-drawer__list-item-action">
|
<div class="pf-c-notification-drawer__list-item-action">
|
||||||
|
${item.event && html`
|
||||||
|
<a class="pf-c-dropdown__toggle pf-m-plain" href="#/events/log/${item.event?.pk}">
|
||||||
|
<i class="pf-icon pf-icon-arrow"></i>
|
||||||
|
</a>
|
||||||
|
`}
|
||||||
<button class="pf-c-dropdown__toggle pf-m-plain" type="button" @click=${() => {
|
<button class="pf-c-dropdown__toggle pf-m-plain" type="button" @click=${() => {
|
||||||
new EventsApi(DEFAULT_CONFIG).eventsNotificationsPartialUpdate({
|
new EventsApi(DEFAULT_CONFIG).eventsNotificationsPartialUpdate({
|
||||||
uuid: item.pk || "",
|
uuid: item.pk || "",
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { EventWithContext } from "../../api/Events";
|
||||||
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||||
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
import PFCard from "@patternfly/patternfly/components/Card/card.css";
|
||||||
|
import AKGlobal from "../../authentik.css";
|
||||||
import "./EventInfo";
|
import "./EventInfo";
|
||||||
|
|
||||||
@customElement("ak-event-info-page")
|
@customElement("ak-event-info-page")
|
||||||
|
@ -28,7 +29,7 @@ export class EventInfoPage extends LitElement {
|
||||||
event!: EventWithContext;
|
event!: EventWithContext;
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [PFBase, PFPage, PFCard].concat(css`
|
return [PFBase, PFPage, PFCard, AKGlobal].concat(css`
|
||||||
.pf-c-card {
|
.pf-c-card {
|
||||||
color: var(--ak-dark-foreground);
|
color: var(--ak-dark-foreground);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ import { DEFAULT_CONFIG } from "../../api/Config";
|
||||||
|
|
||||||
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
import PFPage from "@patternfly/patternfly/components/Page/page.css";
|
||||||
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||||
import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css";
|
import AKGlobal from "../../authentik.css";
|
||||||
|
import PFBase from "@patternfly/patternfly/patternfly-base.css";
|
||||||
|
|
||||||
@customElement("ak-flow-view")
|
@customElement("ak-flow-view")
|
||||||
export class FlowViewPage extends LitElement {
|
export class FlowViewPage extends LitElement {
|
||||||
|
@ -29,7 +30,7 @@ export class FlowViewPage extends LitElement {
|
||||||
flow!: Flow;
|
flow!: Flow;
|
||||||
|
|
||||||
static get styles(): CSSResult[] {
|
static get styles(): CSSResult[] {
|
||||||
return [PFPage, PFContent, PFGallery].concat(
|
return [PFBase, PFPage, PFContent, AKGlobal].concat(
|
||||||
css`
|
css`
|
||||||
img.pf-icon {
|
img.pf-icon {
|
||||||
max-height: 24px;
|
max-height: 24px;
|
||||||
|
|
Reference in New Issue