IKHSAN
ENID Baca dalam Bahasa Indonesia

homeio

Public

Forked from doctor-io/homeio

Branch
main
Latest commit
958d74616 October 2026

notification-events.ts

Open 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,
    }),
  );
}
bytes
518
lines
23
Type
ts
Latest commit
16 October 2026