Skip to content

Commit

Permalink
[Updated App Notification Icon and Text]
Browse files Browse the repository at this point in the history
- Changed the app notification icon
- Updated the notification text
  • Loading branch information
Adedoyin-Emmanuel committed Jun 15, 2023
1 parent c35e8cb commit 16a08a2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Binary file modified assets/icon.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,8 @@ app
});
})
.catch(console.log);

if (process.platform === 'win32')
{
app.setAppUserModelId(app.name);
}
7 changes: 7 additions & 0 deletions src/main/misc/electron-notification.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { Notification } from 'electron';
const path = require('path');
import { ipcMain, dialog, shell } from 'electron';

interface notificationProps {
title: string;
text: string;
type: string;

}
const appIcon = path.resolve(__dirname, './../../../assets/icon.png');

ipcMain.on('show-notification', (event, message: notificationProps) => {
const { title, text } = message;

const notification = new Notification({
title: title,
body: text,
silent: false,
icon:appIcon
});

notification.show();
Expand Down

0 comments on commit 16a08a2

Please sign in to comment.