From 3edc61126657edca727db2a9a0cbde3b94941f29 Mon Sep 17 00:00:00 2001 From: Andres Date: Wed, 16 Mar 2022 15:03:27 -0500 Subject: [PATCH 1/2] Moving tray variable to global. --- app/renderers/tray.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/renderers/tray.js b/app/renderers/tray.js index 41a2299..2162966 100644 --- a/app/renderers/tray.js +++ b/app/renderers/tray.js @@ -9,11 +9,13 @@ const ipc = require('electron').ipcRenderer; const mainWindowID = appConfig.getSync('mainWindowID'); const mainWindow = BrowserWindow.fromId(mainWindowID); +let tray = null; + const trayMenu = [ { label: 'New Invoice', click() { - mainWindow.show() + mainWindow.show(); mainWindow.webContents.send('menu-change-tab', 'form'); }, }, @@ -24,7 +26,7 @@ const trayMenu = [ label: 'Go to Invoices', accelerator: 'CmdOrCtrl+Shift+A', click() { - mainWindow.show() + mainWindow.show(); mainWindow.webContents.send('menu-change-tab', 'invoices'); }, }, @@ -32,7 +34,7 @@ const trayMenu = [ label: 'Go to Contacts', accelerator: 'CmdOrCtrl+Shift+D', click() { - mainWindow.show() + mainWindow.show(); mainWindow.webContents.send('menu-change-tab', 'contacts'); }, }, @@ -40,7 +42,7 @@ const trayMenu = [ label: 'Go to Statistics', accelerator: 'CmdOrCtrl+Shift+G', click() { - mainWindow.show() + mainWindow.show(); mainWindow.webContents.send('menu-change-tab', 'statistics'); }, }, @@ -48,7 +50,7 @@ const trayMenu = [ label: 'Go to Settings', accelerator: 'CmdOrCtrl+Shift+S', click() { - mainWindow.show() + mainWindow.show(); mainWindow.webContents.send('menu-change-tab', 'settings'); }, }, @@ -57,7 +59,6 @@ const trayMenu = [ label: 'Quit App', accelerator: 'CmdOrCtrl+Q', click() { - mainWindow.show() ipc.send('quit-app'); }, }, @@ -76,7 +77,7 @@ const pathImg = path.resolve( const image = nativeImage.createFromPath(pathImg); -const tray = new Tray(image.resize({ width: 16, height: 16 })); +tray = new Tray(image.resize({ width: 16, height: 16 })); if (process.platform === 'win32') { tray.on('click', tray.popUpContextMenu); From f83693e6d4b7d479ead8a7ad19069f287f159fde Mon Sep 17 00:00:00 2001 From: Andres Date: Wed, 16 Mar 2022 15:03:44 -0500 Subject: [PATCH 2/2] 1.5.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f9a2bed..5286b39 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "invoncify", "homepage": "https://invoncify.andresmorelos.me", "productName": "Invoncify", - "version": "1.5.3", + "version": "1.5.4", "license": "GPL-3.0", "description": "Flexible invoicing desktop app with beautiful & customizable templates", "author": {