Add notification (#15)

This commit is contained in:
Mylloon 2024-05-17 19:20:49 +02:00
parent b577987efd
commit dfb049f1fb
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,4 +1,4 @@
import { BrowserWindow, app, dialog, ipcMain } from "electron";
import { app, BrowserWindow, dialog, ipcMain, Notification } from "electron";
import { statSync } from "fs";
import {
deleteFile,
@ -61,6 +61,13 @@ app.whenReady().then(() => {
/** Send confirmation to user */
const confirmation = async (message: string) => {
// Send notification
new Notification({
title: "Status",
body: message,
}).show();
// Open dialog
await dialog.showMessageBox(win, { message });
};