IKHSAN
EN Read in EnglishID

homeio

Publik

Fork dari doctor-io/homeio

Branch
main
Commit terakhir
958d74616 Oktober 2026

notification-events.ts

Buka raw
export const DESKTOP_NOTIFICATION_EVENT = "homeio:desktop-notification";

export type DesktopNotificationEventDetail = {
  id: string;
  title: string;
  message: string;
  kind?: "backup-report";
  createdAt?: string;
  read?: boolean;
};

export function dispatchDesktopNotificationEvent(
  detail: DesktopNotificationEventDetail,
) {
  if (typeof window === "undefined") return;

  window.dispatchEvent(
    new CustomEvent<DesktopNotificationEventDetail>(DESKTOP_NOTIFICATION_EVENT, {
      detail,
    }),
  );
}
byte
518
baris
23
Jenis
ts
Commit terakhir
16 Oktober 2026