summaryrefslogtreecommitdiffhomepage
path: root/gui/flow-libs/notification.js.flow
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-11-16 14:33:36 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-11-20 10:48:22 +0100
commit07b0c8747a23e7973b26e65e4015f4c8a81f0758 (patch)
treeabc48cdacdc890e85de5c87861866109a29e80d7 /gui/flow-libs/notification.js.flow
parenta9d5f93836279dd7c1b14ddcf7449422bd7dd788 (diff)
downloadmullvadvpn-07b0c8747a23e7973b26e65e4015f4c8a81f0758.tar.xz
mullvadvpn-07b0c8747a23e7973b26e65e4015f4c8a81f0758.zip
Move notifications and version fetch to the main process
Diffstat (limited to 'gui/flow-libs/notification.js.flow')
-rw-r--r--gui/flow-libs/notification.js.flow51
1 files changed, 0 insertions, 51 deletions
diff --git a/gui/flow-libs/notification.js.flow b/gui/flow-libs/notification.js.flow
deleted file mode 100644
index bf5dda3af2..0000000000
--- a/gui/flow-libs/notification.js.flow
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Notification */
-type NotificationPermission = 'default' | 'denied' | 'granted';
-type NotificationDirection = 'auto' | 'ltr' | 'rtl';
-type VibratePattern = number | Array<number>;
-type NotificationAction = { action: string, title: string, icon?: string };
-type NotificationOptions = {
- dir: NotificationDirection,
- lang: string,
- body: string,
- tag: string,
- image: string,
- icon: string,
- badge: string,
- sound: string,
- vibrate: VibratePattern,
- timestamp: number,
- renotify: boolean,
- silent: boolean,
- requireInteraction: boolean,
- data: ?any,
- actions: Array<NotificationAction>,
-};
-
-declare class Notification extends EventTarget {
- constructor(title: string, options?: $Shape<NotificationOptions>): void;
- static permission: NotificationPermission;
- static requestPermission(
- callback?: (perm: NotificationPermission) => mixed,
- ): Promise<NotificationPermission>;
- static maxActions: number;
- onclick: (evt: Event) => any;
- onerror: (evt: Event) => any;
- title: string;
- dir: NotificationDirection;
- lang: string;
- body: string;
- tag: string;
- image: string;
- icon: string;
- badge: string;
- sound: string;
- vibrate: Array<number>;
- timestamp: number;
- renotify: boolean;
- silent: boolean;
- requireInteraction: boolean;
- data: any;
- actions: Array<NotificationAction>;
-
- close(): void;
-}