Add notification (#15)
This commit is contained in:
parent
b577987efd
commit
dfb049f1fb
1 changed files with 8 additions and 1 deletions
|
@ -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 });
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue