move electron folder

This commit is contained in:
Anton Bracke
2022-02-22 10:41:55 +01:00
parent ac18aab773
commit 41be011d5e
36 changed files with 19 additions and 18 deletions
+20
View File
@@ -0,0 +1,20 @@
import path from "path";
import { Notification, NotificationConstructorOptions } from "electron";
export function createNotification(options: Partial<NotificationConstructorOptions>) {
const notification = new Notification({
title: "WorkAdventure",
icon: path.join(__dirname, "..", "assets", "icons", "logo.png"),
...(options || {}),
});
return notification;
}
export function createAndShowNotification(options: Partial<NotificationConstructorOptions>) {
const notification = createNotification(options);
notification.show();
return notification;
}