diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-01-04 11:21:22 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-01-04 11:21:22 +0100 |
| commit | 1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5 (patch) | |
| tree | fc6fde023e19113b7f4cd473a40066b40b60ac02 /app/lib | |
| parent | d19f790931beca0dcc62ae84f16d45b74d69a9c8 (diff) | |
| parent | 5284829ea740133d949224270ef21fa3fb614bc8 (diff) | |
| download | mullvadvpn-1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5.tar.xz mullvadvpn-1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5.zip | |
Merge branch 'blocking-indicator'
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/tray-icon-manager.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/app/lib/tray-icon-manager.js b/app/lib/tray-icon-manager.js index 73424cb7ef..0669c0994a 100644 --- a/app/lib/tray-icon-manager.js +++ b/app/lib/tray-icon-manager.js @@ -31,14 +31,13 @@ export default class TrayIconManager { _createAnimation(): KeyframeAnimation { const basePath = path.join(path.resolve(__dirname, '..'), 'assets/images/menubar icons'); const filePath = path.join(basePath, 'lock-{}.png'); - const animation = KeyframeAnimation.fromFilePattern(filePath, [1, 9]); + const animation = KeyframeAnimation.fromFilePattern(filePath, [1, 10]); animation.speed = 100; return animation; } _isReverseAnimation(type: TrayIconType): bool { - // unsecured & securing are treated as one - return type !== 'secured'; + return type === 'unsecured'; } get iconType(): TrayIconType { @@ -49,10 +48,15 @@ export default class TrayIconManager { if(this._iconType === type || !this._animation) { return; } const animation = this._animation; - animation.reverse = this._isReverseAnimation(type); - animation.play({ beginFromCurrentState: true }); + if (type === 'secured') { + animation.reverse = true; + animation.play({ beginFromCurrentState: true, startFrame: 8, endFrame: 9 }); + + } else { + animation.reverse = this._isReverseAnimation(type); + animation.play({ beginFromCurrentState: true }); + } this._iconType = type; } - } |
