mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-09 00:21:10 +00:00
Fix app not hiding and add quit option
This commit is contained in:
parent
e184aa13ae
commit
0c9d6312a4
@ -38,6 +38,7 @@ app.on('window-all-closed', () => {
|
||||
// determined opts
|
||||
if(appArgs.minimizeToTray){
|
||||
mainWindow.hide();
|
||||
return;
|
||||
}
|
||||
if (!isOSX()) {
|
||||
app.quit();
|
||||
@ -79,6 +80,13 @@ app.on('ready', () => {
|
||||
appArgs.minimizeToTray = menuItem.checked = !menuItem.checked;
|
||||
fs.writeFileSync(APP_ARGS_FILE_PATH, JSON.stringify(appArgs));
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Close',
|
||||
type: 'normal',
|
||||
click: function (menuItem) {
|
||||
app.quit();
|
||||
}
|
||||
}
|
||||
]);
|
||||
appIcon.setContextMenu(menu);
|
||||
|
Loading…
Reference in New Issue
Block a user