web: fix notification badge not refreshing after clearing notifications
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -17,7 +17,7 @@ import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css"
|
||||
import PFButton from "@patternfly/patternfly/components/Button/button.css";
|
||||
import AKGlobal from "../../authentik.css";
|
||||
import PFContent from "@patternfly/patternfly/components/Content/content.css";
|
||||
import { EVENT_NOTIFICATION_DRAWER_TOGGLE } from "../../constants";
|
||||
import { EVENT_NOTIFICATION_DRAWER_TOGGLE, EVENT_REFRESH } from "../../constants";
|
||||
import { ActionToLabel } from "../../pages/events/utils";
|
||||
import { showMessage } from "../messages/MessageContainer";
|
||||
import { MessageLevel } from "../messages/Message";
|
||||
@ -114,6 +114,12 @@ export class NotificationDrawer extends LitElement {
|
||||
})
|
||||
.then(() => {
|
||||
this.firstUpdated();
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}}
|
||||
>
|
||||
@ -174,6 +180,12 @@ export class NotificationDrawer extends LitElement {
|
||||
message: t`Successfully cleared notifications`,
|
||||
});
|
||||
this.firstUpdated();
|
||||
this.dispatchEvent(
|
||||
new CustomEvent(EVENT_REFRESH, {
|
||||
bubbles: true,
|
||||
composed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
}}
|
||||
class="pf-c-button pf-m-secondary pf-m-block"
|
||||
|
||||
Reference in New Issue
Block a user