Files
imexrps/electron/notification-wrapper/notification-wrapper.js
2020-10-21 19:36:54 -07:00

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;