mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Helpers + Clean Download et Info
This commit is contained in:
16
server/helpers/notify.js
Normal file
16
server/helpers/notify.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const { Notification, shell } = require("electron");
|
||||
const path = require("path");
|
||||
|
||||
function notifyDownloadFinished(folder) {
|
||||
const iconPath = path.join(process.resourcesPath, "confirm-icon.png");
|
||||
const notif = new Notification({
|
||||
title: "Freedom Loader",
|
||||
body: "Ton téléchargement est terminé, clique ici pour l'ouvrir.",
|
||||
icon: iconPath,
|
||||
});
|
||||
|
||||
notif.on("click", () => shell.openPath(folder));
|
||||
notif.show();
|
||||
}
|
||||
|
||||
module.exports = { notifyDownloadFinished };
|
||||
Reference in New Issue
Block a user