From b6d57e59eeef464885bceb6be58f2c99498b7cea Mon Sep 17 00:00:00 2001 From: Maroxy Date: Sun, 17 Oct 2021 13:41:03 +0200 Subject: [PATCH] update --- entry.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/entry.js b/entry.js index 511de6d..3a48a5c 100644 --- a/entry.js +++ b/entry.js @@ -6,6 +6,13 @@ let mainWindow; ipcMain.handle('hide-window', () => mainWindow.hide()); ipcMain.handle('show-window', () => mainWindow.show()); +ipcMain.on('notification', (event, args) => { + new Notification({ + title: args.title, + body: args.content + }).show(); +}); + function createWindow () { // https://www.electronjs.org/docs/latest/api/browser-window/#class-browserwindow @@ -57,8 +64,4 @@ app.whenReady().then(() => { app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit(); -}); - -ipcMain.on('notification', (event, args) => { - new Notification({ title: args.title, body: args.content }).show(); }); \ No newline at end of file