diff --git a/index.js b/index.js index 34446aae..f17f1c64 100644 --- a/index.js +++ b/index.js @@ -193,16 +193,19 @@ function createMenu() { } function getPlatformIcon(filename){ - const opSys = process.platform - if (opSys === 'darwin') { - filename = filename + '.icns' - } else if (opSys === 'win32') { - filename = filename + '.ico' - } else { - filename = filename + '.png' + let ext + switch(process.platform) { + case 'win32': + ext = 'ico' + break + case 'darwin': + case 'linux': + default: + ext = 'png' + break } - return path.join(__dirname, 'app', 'assets', 'images', filename) + return path.join(__dirname, 'app', 'assets', 'images', `${filename}.${ext}`) } app.on('ready', createWindow) diff --git a/package-lock.json b/package-lock.json index 436490f5..c48b42b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1118,9 +1118,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz", - "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.1.0.tgz", + "integrity": "sha512-DfS3b8iHMK5z/YLSme8K5cge168I8j8o1uiVmFCgnnjxZQbCGyraF8bMl7Ju4yfBmCuxD7shOF7eqGkcuIHfsA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -3059,9 +3059,9 @@ } }, "tslib": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz", - "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", "dev": true }, "tunnel": { diff --git a/package.json b/package.json index d9337e1c..093e1c63 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cross-env": "^7.0.2", "electron": "^9.0.0", "electron-builder": "^22.6.1", - "eslint": "^7.0.0" + "eslint": "^7.1.0" }, "repository": { "type": "git",