Remove QuikNotifMixin

This commit is contained in:
2025-09-23 20:26:23 +02:00
parent c6e86841b3
commit 7eaf25a64f
11 changed files with 116 additions and 146 deletions

View File

@@ -1,24 +1,25 @@
export enum NotificationLevel {
Error = "error",
Warning = "warning",
Success = "success",
}
export function createNotification(message: string, level: NotificationLevel) {
const element = document.getElementById("notifications");
const element = document.getElementById("quick-notifications");
if (element === null) {
return false;
}
return element.dispatchEvent(
new CustomEvent("notification-add", {
new CustomEvent("quick-notification-add", {
detail: { text: message, tag: level },
}),
);
}
export function deleteNotifications() {
const element = document.getElementById("notifications");
const element = document.getElementById("quick-notifications");
if (element === null) {
return false;
}
return element.dispatchEvent(new CustomEvent("notification-delete"));
return element.dispatchEvent(new CustomEvent("quick-notification-delete"));
}