summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2018-10-12 14:17:15 -0300
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2018-10-16 11:13:50 -0300
commita11571a3f4516a2ab9c6cb40ac166cf2fbab351d (patch)
tree31d9ce1630c35654a5205374fa33759769ebd299 /gui
parentcf704402133750b02bd26e62cb54992df3765bce (diff)
downloadmullvadvpn-a11571a3f4516a2ab9c6cb40ac166cf2fbab351d.tar.xz
mullvadvpn-a11571a3f4516a2ab9c6cb40ac166cf2fbab351d.zip
Show tunnel IP address in Connect screen
Diffstat (limited to 'gui')
-rw-r--r--gui/packages/desktop/src/renderer/components/Connect.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/gui/packages/desktop/src/renderer/components/Connect.js b/gui/packages/desktop/src/renderer/components/Connect.js
index c642008a1b..e282e52a75 100644
--- a/gui/packages/desktop/src/renderer/components/Connect.js
+++ b/gui/packages/desktop/src/renderer/components/Connect.js
@@ -136,6 +136,19 @@ export default class Connect extends Component<Props> {
}
renderMap() {
+ const tunnelState = this.props.connection.status.state;
+ const details = this.props.connection.status.details;
+
+ let relayIp = null;
+ let relayPort = null;
+ let relayProtocol = null;
+
+ if ((tunnelState === 'connecting' || tunnelState === 'connected') && details) {
+ relayIp = details.address;
+ relayPort = details.tunnel.openvpn.port;
+ relayProtocol = details.tunnel.openvpn.protocol;
+ }
+
return (
<View style={styles.connect}>
<View style={styles.map}>
@@ -143,7 +156,7 @@ export default class Connect extends Component<Props> {
</View>
<View style={styles.container}>
{/* show spinner when connecting */}
- {this.props.connection.status.state === 'connecting' ? (
+ {tunnelState === 'connecting' ? (
<View style={styles.status_icon}>
<Img source="icon-spinner" height={60} width={60} alt="" />
</View>
@@ -155,9 +168,9 @@ export default class Connect extends Component<Props> {
city={this.props.connection.city}
country={this.props.connection.country}
hostname={this.props.connection.hostname}
- relayIp={null}
- relayPort={null}
- relayProtocol={null}
+ relayIp={relayIp}
+ relayPort={relayPort}
+ relayProtocol={relayProtocol}
outIpv4={null}
outIpv6={null}
onConnect={this.props.onConnect}