diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-08-16 18:10:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-16 21:40:23 +0530 |
commit | 26a9dba22236bc22a7612107630282cfe02d20e0 (patch) | |
tree | 25af338b5a4b080a3bd2c60c500a34cafdff3581 /src/webview/notifications.js | |
parent | chore: replace moment.js with day.js (#1804) (diff) | |
download | ferdium-app-26a9dba22236bc22a7612107630282cfe02d20e0.tar.gz ferdium-app-26a9dba22236bc22a7612107630282cfe02d20e0.tar.zst ferdium-app-26a9dba22236bc22a7612107630282cfe02d20e0.zip |
chore: update outdated node_modules (#1807)
- upgrade 'uuid', '@types/uuid', 'macos-version', 'normalize-url' and 'os-name' dependencies to latest
- updated 'macos-version' imports to named imports
Diffstat (limited to 'src/webview/notifications.js')
-rw-r--r-- | src/webview/notifications.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/webview/notifications.js b/src/webview/notifications.js index 205a3220c..73cdb89d4 100644 --- a/src/webview/notifications.js +++ b/src/webview/notifications.js | |||
@@ -1,22 +1,25 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import uuidV1 from 'uuid/v1'; | 2 | import { v1 as uuidV1 } from 'uuid'; |
3 | 3 | ||
4 | const debug = require('debug')('Ferdi:Notifications'); | 4 | const debug = require('debug')('Ferdi:Notifications'); |
5 | 5 | ||
6 | export class NotificationsHandler { | 6 | export class NotificationsHandler { |
7 | onNotify = (data) => data; | 7 | onNotify = data => data; |
8 | 8 | ||
9 | displayNotification(title, options) { | 9 | displayNotification(title, options) { |
10 | return new Promise((resolve) => { | 10 | return new Promise(resolve => { |
11 | debug('New notification', title, options); | 11 | debug('New notification', title, options); |
12 | 12 | ||
13 | const notificationId = uuidV1(); | 13 | const notificationId = uuidV1(); |
14 | 14 | ||
15 | ipcRenderer.sendToHost('notification', this.onNotify({ | 15 | ipcRenderer.sendToHost( |
16 | title, | 16 | 'notification', |
17 | options, | 17 | this.onNotify({ |
18 | notificationId, | 18 | title, |
19 | })); | 19 | options, |
20 | notificationId, | ||
21 | }), | ||
22 | ); | ||
20 | 23 | ||
21 | ipcRenderer.once(`notification-onclick:${notificationId}`, () => { | 24 | ipcRenderer.once(`notification-onclick:${notificationId}`, () => { |
22 | resolve(); | 25 | resolve(); |