diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-12-16 11:11:11 +0100 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2018-01-04 11:20:10 +0100 |
| commit | cb658adb40b3cee337659471ea3221459cce5984 (patch) | |
| tree | 007608e2681ff8ddde49ec3922fefac9e798fe45 /app/components | |
| parent | d19f790931beca0dcc62ae84f16d45b74d69a9c8 (diff) | |
| download | mullvadvpn-cb658adb40b3cee337659471ea3221459cce5984.tar.xz mullvadvpn-cb658adb40b3cee337659471ea3221459cce5984.zip | |
Add blocking internet indicator when the firewall is on but the tunnel isn't up yet
Diffstat (limited to 'app/components')
| -rw-r--r-- | app/components/Connect.css | 52 | ||||
| -rw-r--r-- | app/components/Connect.js | 15 |
2 files changed, 67 insertions, 0 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..798cea02cd 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) { |
