summaryrefslogtreecommitdiffstats
path: root/src/webview
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-29 08:33:01 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-29 08:33:01 +0200
commit20574717c4b54635a8b757fccce64f2a98614997 (patch)
tree0f671af98b8253b13149c7bf5262d0b137881ecf /src/webview
parent5.6.3-nightly.17 [skip ci] (diff)
downloadferdium-app-20574717c4b54635a8b757fccce64f2a98614997.tar.gz
ferdium-app-20574717c4b54635a8b757fccce64f2a98614997.tar.zst
ferdium-app-20574717c4b54635a8b757fccce64f2a98614997.zip
chore: update various outdated node_modules (#1969)
Diffstat (limited to 'src/webview')
-rw-r--r--src/webview/notifications.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/webview/notifications.js b/src/webview/notifications.js
index 205a3220c..22960d818 100644
--- a/src/webview/notifications.js
+++ b/src/webview/notifications.js
@@ -1,22 +1,26 @@
1import { ipcRenderer } from 'electron'; 1import { ipcRenderer } from 'electron';
2import uuidV1 from 'uuid/v1'; 2
3import { v1 as uuidV1 } from 'uuid';
3 4
4const debug = require('debug')('Ferdi:Notifications'); 5const debug = require('debug')('Ferdi:Notifications');
5 6
6export class NotificationsHandler { 7export class NotificationsHandler {
7 onNotify = (data) => data; 8 onNotify = data => data;
8 9
9 displayNotification(title, options) { 10 displayNotification(title, options) {
10 return new Promise((resolve) => { 11 return new Promise(resolve => {
11 debug('New notification', title, options); 12 debug('New notification', title, options);
12 13
13 const notificationId = uuidV1(); 14 const notificationId = uuidV1();
14 15
15 ipcRenderer.sendToHost('notification', this.onNotify({ 16 ipcRenderer.sendToHost(
16 title, 17 'notification',
17 options, 18 this.onNotify({
18 notificationId, 19 title,
19 })); 20 options,
21 notificationId,
22 }),
23 );
20 24
21 ipcRenderer.once(`notification-onclick:${notificationId}`, () => { 25 ipcRenderer.once(`notification-onclick:${notificationId}`, () => {
22 resolve(); 26 resolve();