summaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index a2b4acb00..6a0ee600f 100644
--- a/src/index.js
+++ b/src/index.js
@@ -33,6 +33,7 @@ import {
33 DEFAULT_APP_SETTINGS, 33 DEFAULT_APP_SETTINGS,
34 DEFAULT_WINDOW_OPTIONS, 34 DEFAULT_WINDOW_OPTIONS,
35} from './config'; 35} from './config';
36import { asarPath } from './helpers/asar-helpers';
36/* eslint-enable import/first */ 37/* eslint-enable import/first */
37 38
38const debug = require('debug')('Franz:App'); 39const debug = require('debug')('Franz:App');
@@ -88,6 +89,12 @@ if (!gotTheLock) {
88 window.setPosition(DEFAULT_WINDOW_OPTIONS.x + 100, DEFAULT_WINDOW_OPTIONS.y + 100); 89 window.setPosition(DEFAULT_WINDOW_OPTIONS.x + 100, DEFAULT_WINDOW_OPTIONS.y + 100);
89 window.setSize(DEFAULT_WINDOW_OPTIONS.width, DEFAULT_WINDOW_OPTIONS.height); 90 window.setSize(DEFAULT_WINDOW_OPTIONS.width, DEFAULT_WINDOW_OPTIONS.height);
90 }, 1); 91 }, 1);
92 } else if (argv.includes('--quit')) {
93 // Needs to be delayed to not interfere with mainWindow.restore();
94 setTimeout(() => {
95 debug('Quitting Franz via Task');
96 app.quit();
97 }, 1);
91 } 98 }
92 }); 99 });
93 } 100 }
@@ -265,10 +272,15 @@ app.on('ready', () => {
265 app.setUserTasks([{ 272 app.setUserTasks([{
266 program: process.execPath, 273 program: process.execPath,
267 arguments: `${isDevMode ? `${__dirname} ` : ''}--reset-window`, 274 arguments: `${isDevMode ? `${__dirname} ` : ''}--reset-window`,
268 iconPath: path.join(`${__dirname}`, '../src/assets/images/taskbar/win32/display.ico'), 275 iconPath: asarPath(path.join(isDevMode ? `${__dirname}../src/` : __dirname, 'assets/images/taskbar/win32/display.ico')),
269 iconIndex: 0, 276 iconIndex: 0,
270 title: 'Move Franz to Current Display', 277 title: 'Move Franz to Current Display',
271 description: 'Restore the position and size of Franz', 278 description: 'Restore the position and size of Franz',
279 }, {
280 program: process.execPath,
281 arguments: `${isDevMode ? `${__dirname} ` : ''}--quit`,
282 iconIndex: 0,
283 title: 'Quit Franz',
272 }]); 284 }]);
273 } 285 }
274 286