@@ -2,6 +2,7 @@ const electron = require('electron');
22const Auth = require ( './controllers/auth' ) ;
33const Tray = require ( './controllers/tray' ) ;
44const TaskRunner = require ( './controllers/taskRunner' ) ;
5+ const localShortcut = require ( 'electron-localshortcut' ) ;
56
67const { app, BrowserWindow, shell } = electron ;
78
@@ -27,10 +28,24 @@ const AppWindows = {
2728 this . backgroundProcess = new BrowserWindow ( { show : false } ) ;
2829 this . mainWindow = new BrowserWindow ( { width : 800 , height : 600 , show : true , icon : `${ __dirname } /app.ico` } ) ;
2930 this . mainWindow . loadURL ( `${ __dirname } /views/index.html` ) ;
31+ this . mainWindow . setMenu ( null ) ;
3032
33+ this . configureLocalShortcut ( ) ;
3134 this . bindEventListener ( ) ;
3235 } ,
3336
37+ configureLocalShortcut : function configureLocalShortcut ( ) {
38+ const windowToRegister = this . mainWindow ;
39+
40+ localShortcut . register ( windowToRegister , 'CommandOrControl+R' , ( ) => {
41+ this . mainWindow . reload ( ) ;
42+ } ) ;
43+
44+ localShortcut . register ( windowToRegister , 'CommandOrControl+Shift+I' , ( ) => {
45+ this . mainWindow . toggleDevTools ( ) ;
46+ } ) ;
47+ } ,
48+
3449 bindEventListener : function bindEventListener ( ) {
3550 const self = this ;
3651
0 commit comments