From 7c6287dfd404e96f080c48681c349919868e6f42 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 13 Mar 2019 14:17:06 +0300 Subject: add most basic stuff --- app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app.js') diff --git a/app.js b/app.js index 3dc0926..ba5686a 100755 --- a/app.js +++ b/app.js @@ -30,7 +30,7 @@ function createWindow() { } }); - //mainWindow.setMenu(null); + mainWindow.maximize(); const menu = Menu.buildFromTemplate([ { @@ -39,21 +39,21 @@ function createWindow() { {label: 'Open...', click: () => { openFileDialog(); }}, - {label: 'Exit'} + {label: 'Exit', click: () => { app.quit(); }} ] }, { label: 'Location', submenu: [ - {label: 'Go to...'}, - {label: 'Sync to last page read'}, + {label: 'Go to...', click: () => { mainWindow.webContents.send("open-location"); }}, + {label: 'Sync to last page read', click: () => { mainWindow.webContents.send("sync-to-last"); }}, ] }, { label: 'Tools', submenu: [ - {label: 'Settings'}, - {label: 'Toggle fullscreen'}, + {label: 'Settings', click: () => { mainWindow.webContents.send("open-settings"); }}, + {label: 'Toggle fullscreen', click: () => { mainWindow.setFullScreen(!mainWindow.isFullScreen()); }}, ] }, ]); -- cgit v1.2.3