diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2024-04-11 18:11:33 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2024-04-11 18:11:33 +0200 |
| commit | 9aaebecc3c6d1838722a66875b5a330ca7967020 (patch) | |
| tree | c877bcc16c9eb3e325aecdd5f2861b9e6f5824a5 /gui/src/renderer/components/ConnectionPanel.tsx | |
| parent | d2e198cd8ce15225d4329cbb61f4561e293ea239 (diff) | |
| parent | 36322705705857c549fa90616884bc64740cbbef (diff) | |
| download | mullvadvpn-9aaebecc3c6d1838722a66875b5a330ca7967020.tar.xz mullvadvpn-9aaebecc3c6d1838722a66875b5a330ca7967020.zip | |
Merge branch 'add-custom-bridge-to-gui-des-431'
Diffstat (limited to 'gui/src/renderer/components/ConnectionPanel.tsx')
| -rw-r--r-- | gui/src/renderer/components/ConnectionPanel.tsx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gui/src/renderer/components/ConnectionPanel.tsx b/gui/src/renderer/components/ConnectionPanel.tsx index 07547363a0..a99140bb43 100644 --- a/gui/src/renderer/components/ConnectionPanel.tsx +++ b/gui/src/renderer/components/ConnectionPanel.tsx @@ -6,7 +6,6 @@ import { colors } from '../../config.json'; import { EndpointObfuscationType, ProxyType, - proxyTypeToString, RelayProtocol, TunnelType, tunnelTypeToString, @@ -164,10 +163,9 @@ export default class ConnectionPanel extends React.Component<IProps> { entry: this.props.entryHostname, }, ); - } else if (this.props.bridgeInfo?.ip) { - return sprintf(messages.pgettext('connection-info', '%(relay)s via %(entry)s'), { + } else if (this.props.bridgeInfo !== undefined) { + return sprintf(messages.pgettext('connection-info', '%(relay)s via Custom bridge'), { relay: this.props.hostname, - entry: this.props.bridgeInfo.ip, }); } else { return this.props.hostname || ''; @@ -181,7 +179,7 @@ export default class ConnectionPanel extends React.Component<IProps> { const tunnelType = tunnelTypeToString(inAddress.tunnelType); if (bridgeInfo) { - const bridgeType = proxyTypeToString(bridgeInfo.bridgeType); + const bridgeType = this.bridgeType(); return sprintf( // TRANSLATORS: The tunnel type line displayed below the hostname line on the main screen @@ -201,4 +199,12 @@ export default class ConnectionPanel extends React.Component<IProps> { return ''; } } + + private bridgeType() { + if (this.props.bridgeHostname && this.props.bridgeInfo?.bridgeType === 'shadowsocks') { + return 'Shadowsocks bridge'; + } else { + return 'Custom bridge'; + } + } } |
