Skip to content

Commit 38a245f

Browse files
committed
Prepare show-tray-notification
1 parent 2cf7f9a commit 38a245f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

main.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const {app, BrowserWindow, Tray, Menu, globalShortcut } = require('electron/main');
1+
const {app, BrowserWindow, Tray, Notification, Menu, globalShortcut } = require('electron/main');
22
const path = require('node:path');
33
const {ipcMain} = require('electron')
44
const http = require('http');
@@ -139,7 +139,16 @@ ipcMain.on("quit", async (event,arg) => {
139139
event.returnValue=true;
140140
});
141141

142+
function show_noti(arg) {
143+
const notification = new Notification({
144+
title: 'Waevlog',
145+
body: 'QSO logged: '+arg
146+
});
147+
notification.show();
148+
}
149+
142150
ipcMain.on("test", async (event,arg) => {
151+
143152
let result={};
144153
let plain;
145154
try {

0 commit comments

Comments
 (0)