mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-27 21:01:00 +03:00
update
This commit is contained in:
parent
b0112f04af
commit
b6d57e59ee
1 changed files with 7 additions and 4 deletions
11
entry.js
11
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
|
||||
|
@ -58,7 +65,3 @@ 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();
|
||||
});
|
Loading…
Add table
Reference in a new issue