From 9191cb0674c3b90183f9269dea7a5e03cb13ebc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Stanislav?= Date: Thu, 26 Oct 2017 22:29:52 +0200 Subject: [PATCH] Fix launch protocol on Linux - Closes #909 --- app/src/main.js | 8 ++++---- package.json | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/src/main.js b/app/src/main.js index 30afc92a2..39bb17f67 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -70,8 +70,8 @@ function createWindow() { win.on('blur', () => win.webContents.send('blur')); win.on('focus', () => win.webContents.send('focus')); - if (process.platform === 'win32') { - sendUrlToRouter(process.argv.slice(1)); + if (process.platform !== 'darwin') { + sendUrlToRouter(process.argv[1] || ''); } Menu.setApplicationMenu(buildMenu(app, copyright, i18n)); @@ -142,8 +142,8 @@ app.setAsDefaultProtocolClient(protocolName); // Force single instance application const isSecondInstance = app.makeSingleInstance((argv) => { - if (process.platform === 'win32') { - sendUrlToRouter(argv.slice(1)); + if (process.platform !== 'darwin') { + sendUrlToRouter(argv[1] || ''); } if (win) { if (win.isMinimized()) win.restore(); diff --git a/package.json b/package.json index ad6b99283..bee823905 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "css-loader": "0.28.7", "cucumber": "2.2.0", "del-cli": "1.1.0", - "electron": "1.7.8", + "electron": "1.8.1", "electron-builder": "19.32.2", "electron-json-storage": "^3.2.0", "enzyme": "2.9.1", @@ -149,7 +149,11 @@ "deb", "rpm", "tar.gz" - ] + ], + "desktop": { + "MimeType": "application/lisk;x-scheme-handler/lisk" + }, + "category": "Network" }, "win": { "target": "nsis"