From 907d3823584000eaf8902e57d906095bf5fe01f8 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Tue, 21 Jun 2016 11:48:18 -0400 Subject: [PATCH 001/185] Wrap in setImmediate() https://github.com/electron/electron/issues/5656#issuecomment-221141312 --- main-process/native-ui/tray/tray.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/main-process/native-ui/tray/tray.js b/main-process/native-ui/tray/tray.js index 52cc83ef..aa6c583c 100644 --- a/main-process/native-ui/tray/tray.js +++ b/main-process/native-ui/tray/tray.js @@ -15,7 +15,9 @@ ipc.on('put-in-tray', function (event) { label: 'Remove', click: function () { event.sender.send('tray-removed') - appIcon.destroy() + setImmediate(function () { + appIcon.destroy() + }) } }]) appIcon.setToolTip('Electron Demo in the tray.') @@ -23,9 +25,15 @@ ipc.on('put-in-tray', function (event) { }) ipc.on('remove-tray', function () { - appIcon.destroy() + setImmediate(function () { + appIcon.destroy() + }) }) app.on('window-all-closed', function () { - if (appIcon) appIcon.destroy() + if (appIcon) { + setImmediate(function () { + appIcon.destroy() + }) + } }) From a742d4e0e300ed7c72a907b998eab198a351c6a1 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Tue, 21 Jun 2016 16:40:44 -0400 Subject: [PATCH 002/185] Don't destroy icon in click event --- main-process/native-ui/tray/tray.js | 7 ------- renderer-process/native-ui/tray/tray.js | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/main-process/native-ui/tray/tray.js b/main-process/native-ui/tray/tray.js index aa6c583c..80a78c63 100644 --- a/main-process/native-ui/tray/tray.js +++ b/main-process/native-ui/tray/tray.js @@ -15,9 +15,6 @@ ipc.on('put-in-tray', function (event) { label: 'Remove', click: function () { event.sender.send('tray-removed') - setImmediate(function () { - appIcon.destroy() - }) } }]) appIcon.setToolTip('Electron Demo in the tray.') @@ -25,15 +22,11 @@ ipc.on('put-in-tray', function (event) { }) ipc.on('remove-tray', function () { - setImmediate(function () { appIcon.destroy() - }) }) app.on('window-all-closed', function () { if (appIcon) { - setImmediate(function () { appIcon.destroy() - }) } }) diff --git a/renderer-process/native-ui/tray/tray.js b/renderer-process/native-ui/tray/tray.js index bde457d2..d39da0e4 100644 --- a/renderer-process/native-ui/tray/tray.js +++ b/renderer-process/native-ui/tray/tray.js @@ -17,6 +17,7 @@ trayBtn.addEventListener('click', function (event) { }) // Tray removed from context menu on icon ipc.on('tray-removed', function () { + ipc.send('remove-tray') trayOn = false document.getElementById('tray-countdown').innerHTML = '' }) From 1375ffee76beed805fb9a5aeb1830552f3736cab Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Tue, 21 Jun 2016 16:44:05 -0400 Subject: [PATCH 003/185] Clean up --- main-process/native-ui/tray/tray.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main-process/native-ui/tray/tray.js b/main-process/native-ui/tray/tray.js index 80a78c63..961b506d 100644 --- a/main-process/native-ui/tray/tray.js +++ b/main-process/native-ui/tray/tray.js @@ -22,11 +22,9 @@ ipc.on('put-in-tray', function (event) { }) ipc.on('remove-tray', function () { - appIcon.destroy() + appIcon.destroy() }) app.on('window-all-closed', function () { - if (appIcon) { - appIcon.destroy() - } + if (appIcon) { appIcon.destroy() } }) From fb858f84d3f61af568e08edc0d9d44ad6f1cf8ec Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Tue, 21 Jun 2016 16:45:33 -0400 Subject: [PATCH 004/185] Oops, clean up again --- main-process/native-ui/tray/tray.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-process/native-ui/tray/tray.js b/main-process/native-ui/tray/tray.js index 961b506d..1a040f55 100644 --- a/main-process/native-ui/tray/tray.js +++ b/main-process/native-ui/tray/tray.js @@ -26,5 +26,5 @@ ipc.on('remove-tray', function () { }) app.on('window-all-closed', function () { - if (appIcon) { appIcon.destroy() } + if (appIcon) appIcon.destroy() }) From 85179dbc3b91a5865d29ae01ed9d162a8a6a7a04 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 24 Jun 2016 14:50:38 +0900 Subject: [PATCH 005/185] Update font stack --- assets/css/global.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/global.css b/assets/css/global.css index 99997d09..83a7a3d8 100644 --- a/assets/css/global.css +++ b/assets/css/global.css @@ -16,7 +16,7 @@ html { height: 100%; - font-family: system, -apple-system, '.SFNSText-Regular', 'SF UI Text', 'Lucida Grande', 'Segoe UI', Ubuntu, Cantarell, sans-serif; + font-family: 'BlinkMacSystemFont', 'Lucida Grande', 'Segoe UI', Ubuntu, Cantarell, sans-serif; font-size: 14px; line-height: 1.5; overflow: hidden; /* Prevents rubber-band scrolling of the whole "page" */ From bb2178e68008c9787a8d03d52ba55b2805060e41 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 28 Jun 2016 17:14:05 -0700 Subject: [PATCH 006/185] add devtron to dev tool automatically when in development --- assets/devtron.js | 3 +++ index.html | 1 + package.json | 1 + 3 files changed, 5 insertions(+) create mode 100644 assets/devtron.js diff --git a/assets/devtron.js b/assets/devtron.js new file mode 100644 index 00000000..aeb90af4 --- /dev/null +++ b/assets/devtron.js @@ -0,0 +1,3 @@ +const isDev = require('electron-is-dev') + +if (isDev) require('devtron').install() diff --git a/index.html b/index.html index 5d447965..eb2f2bfc 100644 --- a/index.html +++ b/index.html @@ -106,6 +106,7 @@