Skip to content

Commit 16a08a2

Browse files
[Updated App Notification Icon and Text]
- Changed the app notification icon - Updated the notification text
1 parent c35e8cb commit 16a08a2

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

assets/icon.ico

-76.7 KB
Binary file not shown.

src/main/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,8 @@ app
142142
});
143143
})
144144
.catch(console.log);
145+
146+
if (process.platform === 'win32')
147+
{
148+
app.setAppUserModelId(app.name);
149+
}

src/main/misc/electron-notification.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
import { Notification } from 'electron';
2+
const path = require('path');
23
import { ipcMain, dialog, shell } from 'electron';
4+
35
interface notificationProps {
46
title: string;
57
text: string;
68
type: string;
9+
710
}
11+
const appIcon = path.resolve(__dirname, './../../../assets/icon.png');
812

913
ipcMain.on('show-notification', (event, message: notificationProps) => {
1014
const { title, text } = message;
15+
1116
const notification = new Notification({
1217
title: title,
1318
body: text,
19+
silent: false,
20+
icon:appIcon
1421
});
1522

1623
notification.show();

0 commit comments

Comments
 (0)