Commit cfccb1a1 authored by Jeremy Bokobza's avatar Jeremy Bokobza

OSX fix

parent 62e2f169
...@@ -58,18 +58,20 @@ function createWindow() { ...@@ -58,18 +58,20 @@ function createWindow() {
// Emitted when the window is going to close. // Emitted when the window is going to close.
mainWindow.on('close', function () { mainWindow.on('close', function () {
var http = require('http'); if (process.platform !== 'darwin') {
const options = { var http = require('http');
hostname: 'localhost', const options = {
port: 5000, hostname: 'localhost',
path: '/api/node/shutdown', port: 5000,
method: 'POST' path: '/api/node/shutdown',
method: 'POST'
}; };
const req = http.request(options, (res) => {}); const req = http.request(options, (res) => {});
req.write(''); req.write('');
req.end(); req.end();
}); }
});
} }
// This method will be called when Electron has finished // This method will be called when Electron has finished
...@@ -133,7 +135,7 @@ function createTray() { ...@@ -133,7 +135,7 @@ function createTray() {
let appIcon = null; let appIcon = null;
var iconPath var iconPath
if (os.platform == 'win32') { if (os.platform() === 'win32') {
iconPath = __dirname + '/assets/images/breeze-logo-tray.ico'; iconPath = __dirname + '/assets/images/breeze-logo-tray.ico';
} else { } else {
iconPath = __dirname + '/assets/images/breeze-logo-tray.png'; iconPath = __dirname + '/assets/images/breeze-logo-tray.png';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment