Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 916 Bytes

File metadata and controls

26 lines (21 loc) · 916 Bytes

Notifications

app.notify(options) shows a native OS notification, backed by node-notifier (Windows, macOS, Linux).

await app.notify("Export finished");

// or with options:
await app.notify({
  title: "My App",
  message: "Export finished",
  icon: "./dist/icons/icon128.png",
  sound: true,
  wait: true, // wait for the user to interact, and resolve with their response
});
  • A plain string is shorthand for { message: <string> }.
  • icon - path to an icon image. Use one of the icons generated by the build script (see Icons).
  • wait - if true, the returned promise resolves once the user interacts with the notification (e.g. clicks it), with { response, metadata }.

See node-notifier's docs for the full set of platform-specific options (actions, reply fields, sounds, etc.) - they're passed through as-is.