added sendNotification and show onTray functions

This commit is contained in:
Abhinav-grd 2021-03-30 18:28:30 +05:30
parent 534e1b513b
commit f4a5ee4d6b

View file

@ -60,10 +60,19 @@ const getExportedFiles = async (dir: string) => {
}
};
const sendNotification = (content: string) => {
ipcRenderer.send('send-notification', content);
};
const showOnTray = (item: any[]) => {
ipcRenderer.send('update-tray', item);
};
var windowObject: any = window;
windowObject['ElectronAPIs'] = {
saveToDisk,
selectDirectory,
updateExportRecord,
getExportedFiles,
sendNotification,
showOnTray,
};