diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-11-16 14:33:36 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-11-20 10:48:22 +0100 |
| commit | 07b0c8747a23e7973b26e65e4015f4c8a81f0758 (patch) | |
| tree | abc48cdacdc890e85de5c87861866109a29e80d7 /gui/flow-libs/electron.js.flow | |
| parent | a9d5f93836279dd7c1b14ddcf7449422bd7dd788 (diff) | |
| download | mullvadvpn-07b0c8747a23e7973b26e65e4015f4c8a81f0758.tar.xz mullvadvpn-07b0c8747a23e7973b26e65e4015f4c8a81f0758.zip | |
Move notifications and version fetch to the main process
Diffstat (limited to 'gui/flow-libs/electron.js.flow')
| -rw-r--r-- | gui/flow-libs/electron.js.flow | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gui/flow-libs/electron.js.flow b/gui/flow-libs/electron.js.flow index bc37e5a524..52df468272 100644 --- a/gui/flow-libs/electron.js.flow +++ b/gui/flow-libs/electron.js.flow @@ -197,6 +197,43 @@ declare module 'electron' { popup(browserWindow?: BrowserWindow, options?: PopupOptions): void; } + // https://electronjs.org/docs/api/structures/notification-action + declare type NotificationAction = { + type: 'button', + text?: string + }; + + // https://electronjs.org/docs/api/notification + declare type NotificationOptions = { + title?: string, + subtitle?: string, + body: string, + silent?: boolean, + icon?: string | NativeImage, + hasReply?: boolean, + replyPlaceholder?: string, + sound?: string, + actions?: Array<NotificationAction>, + closeButtonText?: string + }; + + declare class Notification extends EventEmitter { + static isSupported(): boolean; + constructor(options: NotificationOptions): void; + show(): void; + close(): void; + title: string; + subtitle: string; + body: string; + silent: boolean; + hasReply: boolean; + replyPlaceholder: string; + sound: string; + actions: Array<NotificationAction>, + closeButtonText: string; + } + + // http://electron.atom.io/docs/api/app declare class App extends EventEmitter { |
