diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-16 21:28:22 +0000 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-03-16 21:28:22 +0000 |
| commit | 72502ac8e21ae63d1b806cb3afe7fcd4b2f962b1 (patch) | |
| tree | 8bc1b8a4fd8d8cd66dd0966c8a96cc103719277f | |
| parent | 627c285b8409a8872208f54e8b9f3c3e3f4bd34d (diff) | |
| download | mullvadvpn-72502ac8e21ae63d1b806cb3afe7fcd4b2f962b1.tar.xz mullvadvpn-72502ac8e21ae63d1b806cb3afe7fcd4b2f962b1.zip | |
Update docs and fix lint issues
| -rw-r--r-- | app/lib/tray-animation.js | 11 | ||||
| -rw-r--r-- | app/lib/tray-animator.js | 3 | ||||
| -rw-r--r-- | app/main.js | 1 |
3 files changed, 1 insertions, 14 deletions
diff --git a/app/lib/tray-animation.js b/app/lib/tray-animation.js index 82496033ab..6e9b546e43 100644 --- a/app/lib/tray-animation.js +++ b/app/lib/tray-animation.js @@ -1,6 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; -import path from 'path'; import { nativeImage } from 'electron'; /** @@ -8,13 +6,6 @@ import { nativeImage } from 'electron'; * * @export * @class TrayAnimation - * @property {number} speed - speed per frame - * @property {bool} repeat - whether to repeat animation - * @property {bool} reverse - play in reverse - * @property {bool} alternate - whether to alternate sequence when reached the end of animation - * @property {string[]} source - image source - * @property {electron.NativeImage} nativeImages - a sequence of native images - * @property {bool} isFinished - whether animation sequence is finished (repeating animation never finish) */ export class TrayAnimation { @@ -141,7 +132,7 @@ export class TrayAnimation { this._nativeImages = images.map((pathOrNativeImage) => { if(typeof(pathOrNativeImage) === 'string') { return nativeImage.createFromPath(pathOrNativeImage); - } else if(typeof(pathOrNativeImage) === 'NativeImage') { + } else if((pathOrNativeImage + '') === '[object NativeImage]') { return pathOrNativeImage; } return nativeImage.createEmpty(); diff --git a/app/lib/tray-animator.js b/app/lib/tray-animator.js index 601362d96d..7f0374955c 100644 --- a/app/lib/tray-animator.js +++ b/app/lib/tray-animator.js @@ -1,7 +1,4 @@ import assert from 'assert'; -import fs from 'fs'; -import path from 'path'; -import { nativeImage } from 'electron'; /** * Tray icon animator diff --git a/app/main.js b/app/main.js index 56cf8b6967..9f83a32bb9 100644 --- a/app/main.js +++ b/app/main.js @@ -10,7 +10,6 @@ const userDataPath = path.join(applicationSupportPath, 'mullvad.vpn-103'); app.setPath('userData', userDataPath); const isDevelopment = (process.env.NODE_ENV === 'development'); - let window = null; let tray = null; let macEventMonitor = null; |
