summaryrefslogtreecommitdiffhomepage
path: root/app/lib
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-01-04 11:21:22 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-01-04 11:21:22 +0100
commit1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5 (patch)
treefc6fde023e19113b7f4cd473a40066b40b60ac02 /app/lib
parentd19f790931beca0dcc62ae84f16d45b74d69a9c8 (diff)
parent5284829ea740133d949224270ef21fa3fb614bc8 (diff)
downloadmullvadvpn-1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5.tar.xz
mullvadvpn-1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5.zip
Merge branch 'blocking-indicator'
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/tray-icon-manager.js16
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;
}
-
}