15 lines
419 B
JavaScript
15 lines
419 B
JavaScript
const { Notification } = require("electron");
|
|
const path = require("path");
|
|
const { store } = require("../electron-store");
|
|
|
|
function NewNotification(config) {
|
|
const enableNotifications = store.get("enableNotifications");
|
|
if (enableNotifications) {
|
|
Notification({
|
|
icon: path.join(__dirname, "../../src/assets/logo512.png"),
|
|
...config,
|
|
}).show();
|
|
}
|
|
}
|
|
exports.NewNotification = NewNotification;
|