Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #26 from AndresMorelos/fix-tray
Browse files Browse the repository at this point in the history
Fix tray
  • Loading branch information
AndresMorelos authored Mar 16, 2022
2 parents dfde3ae + f83693e commit cdc3b42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions app/renderers/tray.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
},
},
Expand All @@ -24,31 +26,31 @@ const trayMenu = [
label: 'Go to Invoices',
accelerator: 'CmdOrCtrl+Shift+A',
click() {
mainWindow.show()
mainWindow.show();
mainWindow.webContents.send('menu-change-tab', 'invoices');
},
},
{
label: 'Go to Contacts',
accelerator: 'CmdOrCtrl+Shift+D',
click() {
mainWindow.show()
mainWindow.show();
mainWindow.webContents.send('menu-change-tab', 'contacts');
},
},
{
label: 'Go to Statistics',
accelerator: 'CmdOrCtrl+Shift+G',
click() {
mainWindow.show()
mainWindow.show();
mainWindow.webContents.send('menu-change-tab', 'statistics');
},
},
{
label: 'Go to Settings',
accelerator: 'CmdOrCtrl+Shift+S',
click() {
mainWindow.show()
mainWindow.show();
mainWindow.webContents.send('menu-change-tab', 'settings');
},
},
Expand All @@ -57,7 +59,6 @@ const trayMenu = [
label: 'Quit App',
accelerator: 'CmdOrCtrl+Q',
click() {
mainWindow.show()
ipc.send('quit-app');
},
},
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit cdc3b42

Please sign in to comment.