summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/images/menubar icons/lock-10.pngbin0 -> 166 bytes
-rw-r--r--app/assets/images/menubar icons/lock-10@2x.pngbin0 -> 212 bytes
-rw-r--r--app/components/Connect.css52
-rw-r--r--app/components/Connect.js17
-rw-r--r--app/lib/tray-icon-manager.js16
5 files changed, 78 insertions, 7 deletions
diff --git a/app/assets/images/menubar icons/lock-10.png b/app/assets/images/menubar icons/lock-10.png
new file mode 100644
index 0000000000..530e756c56
--- /dev/null
+++ b/app/assets/images/menubar icons/lock-10.png
Binary files differ
diff --git a/app/assets/images/menubar icons/lock-10@2x.png b/app/assets/images/menubar icons/lock-10@2x.png
new file mode 100644
index 0000000000..af73aa8c7b
--- /dev/null
+++ b/app/assets/images/menubar icons/lock-10@2x.png
Binary files differ
diff --git a/app/components/Connect.css b/app/components/Connect.css
index 41c3c61894..592e824ea2 100644
--- a/app/components/Connect.css
+++ b/app/components/Connect.css
@@ -30,6 +30,58 @@
margin-top: 16px;
}
+.connect__blocking-container {
+ color: rgba(255,255,255,0.8);
+ max-height: 0px;
+ height: 100%;
+ width: 100%;
+ overflow: hidden;
+
+ text-transform: uppercase;
+
+ position: absolute;
+ border-bottom: 1px solid rgba(255,255,255,0.8);
+ transition: max-height 0.5s;
+}
+.connect__blocking-container.show {
+ max-height: 36px;
+}
+.connect__blocking-container.hide {
+ max-height: 0px;
+ border-bottom: 0px solid rgb(208, 2, 27);
+ transition: max-height 0.5s, border-bottom 0.1s 0.4s;
+}
+
+.connect__blocking-message {
+ display: flex;
+ flex-direction: row;
+ margin: 8px 20px;
+ font-family: "Open Sans";
+ font-size: 12px;
+ font-weight: 800;
+ line-height: 17px;
+}
+
+.connect__blocking-icon {
+ width: 10px;
+ height: 10px;
+ border-radius: 5px;
+ margin-top: 4px;
+ margin-right: 8px;
+
+ background-color: rgb(208, 2, 27);
+}
+
+.connect__server {
+ padding: 7px 12px 9px;
+ background-color: rgba(255,255,255,0.2);
+ border-radius: 4px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ backdrop-filter: blur(4px);
+}
+
.connect__server-label {
flex: 1 1 auto;
text-align: center;
diff --git a/app/components/Connect.js b/app/components/Connect.js
index 93ac19a4eb..2412a35872 100644
--- a/app/components/Connect.js
+++ b/app/components/Connect.js
@@ -175,6 +175,7 @@ export default class Connect extends Component {
</div>
<div className="connect__container">
+ { this._renderIsBlockingInternetMessage() }
<div className="connect__status">
{ /* show spinner when connecting */ }
<div className={ this.spinnerClass() }>
@@ -295,6 +296,20 @@ export default class Connect extends Component {
);
}
+ _renderIsBlockingInternetMessage() {
+ let animationClass = 'hide';
+ if (this.props.connection.status === 'connecting') {
+ animationClass = 'show';
+ }
+
+ return <div className={`connect__blocking-container ${animationClass}`}>
+ <div className="connect__blocking-message">
+ <div className="connect__blocking-icon">&nbsp;</div>
+ blocking internet
+ </div>
+ </div>;
+ }
+
// Handlers
onExternalLink(type: string) {
@@ -312,9 +327,9 @@ export default class Connect extends Component {
headerStyle(): HeaderBarStyle {
switch(this.props.connection.status) {
- case 'connecting':
case 'disconnected':
return 'error';
+ case 'connecting':
case 'connected':
return 'success';
}
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;
}
-
}