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/components | |
| parent | d19f790931beca0dcc62ae84f16d45b74d69a9c8 (diff) | |
| parent | 5284829ea740133d949224270ef21fa3fb614bc8 (diff) | |
| download | mullvadvpn-1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5.tar.xz mullvadvpn-1671ca0d8bb22fead9dfd7b839aa495b1cb69bf5.zip | |
Merge branch 'blocking-indicator'
Diffstat (limited to 'app/components')
| -rw-r--r-- | app/components/Connect.css | 52 | ||||
| -rw-r--r-- | app/components/Connect.js | 17 |
2 files changed, 68 insertions, 1 deletions
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"> </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'; } |
