add desktop app

This commit is contained in:
Anton Bracke
2022-02-17 18:09:57 +01:00
parent 8dc31c9e06
commit 31a0d7d452
20 changed files with 4601 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
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;
}