diff options
| -rw-r--r-- | gui/src/renderer/components/ConnectionPanel.tsx | 12 | ||||
| -rw-r--r-- | gui/src/renderer/containers/ConnectionPanelContainer.tsx | 1 | ||||
| -rw-r--r-- | gui/src/renderer/redux/connection/reducers.ts | 3 | ||||
| -rw-r--r-- | gui/src/shared/daemon-rpc-types.ts | 1 |
4 files changed, 14 insertions, 3 deletions
diff --git a/gui/src/renderer/components/ConnectionPanel.tsx b/gui/src/renderer/components/ConnectionPanel.tsx index 53b17153eb..57b5d1e02a 100644 --- a/gui/src/renderer/components/ConnectionPanel.tsx +++ b/gui/src/renderer/components/ConnectionPanel.tsx @@ -35,6 +35,7 @@ interface IProps { isOpen: boolean; hostname?: string; bridgeHostname?: string; + entryHostname?: string; inAddress?: IInAddress; entryLocationInAddress?: IInAddress; bridgeInfo?: IBridgeData; @@ -132,15 +133,20 @@ export default class ConnectionPanel extends React.Component<IProps> { private hostnameLine() { if (this.props.hostname && this.props.bridgeHostname) { + return sprintf(messages.pgettext('connection-info', '%(relay)s via %(entry)s'), { + relay: this.props.hostname, + entry: this.props.bridgeHostname, + }); + } else if (this.props.hostname && this.props.entryHostname) { return sprintf( // TRANSLATORS: The hostname line displayed below the country on the main screen // TRANSLATORS: Available placeholders: // TRANSLATORS: %(relay)s - the relay hostname - // TRANSLATORS: %(bridge)s - the bridge hostname - messages.pgettext('connection-info', '%(relay)s via %(bridge)s'), + // TRANSLATORS: %(entry)s - the entry relay hostname + messages.pgettext('connection-info', '%(relay)s via %(entry)s'), { relay: this.props.hostname, - bridge: this.props.bridgeHostname, + entry: this.props.entryHostname, }, ); } else { diff --git a/gui/src/renderer/containers/ConnectionPanelContainer.tsx b/gui/src/renderer/containers/ConnectionPanelContainer.tsx index 290e761727..bf8ac77660 100644 --- a/gui/src/renderer/containers/ConnectionPanelContainer.tsx +++ b/gui/src/renderer/containers/ConnectionPanelContainer.tsx @@ -76,6 +76,7 @@ const mapStateToProps = (state: IReduxState) => { isOpen: state.userInterface.connectionPanelVisible, hostname: state.connection.hostname, bridgeHostname: state.connection.bridgeHostname, + entryHostname: state.connection.entryHostname, inAddress, entryLocationInAddress, bridgeInfo, diff --git a/gui/src/renderer/redux/connection/reducers.ts b/gui/src/renderer/redux/connection/reducers.ts index 31551d81ba..ffb0fd1d84 100644 --- a/gui/src/renderer/redux/connection/reducers.ts +++ b/gui/src/renderer/redux/connection/reducers.ts @@ -8,6 +8,7 @@ export interface IConnectionReduxState { ipv6?: Ip; hostname?: string; bridgeHostname?: string; + entryHostname?: string; latitude?: number; longitude?: number; country?: string; @@ -21,6 +22,7 @@ const initialState: IConnectionReduxState = { ipv6: undefined, hostname: undefined, bridgeHostname: undefined, + entryHostname: undefined, latitude: undefined, longitude: undefined, country: undefined, @@ -43,6 +45,7 @@ export default function ( longitude: action.newLocation.longitude, hostname: action.newLocation.hostname, bridgeHostname: action.newLocation.bridgeHostname, + entryHostname: action.newLocation.entryHostname, }; case 'UPDATE_BLOCK_STATE': diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts index 23b9a72b9e..3f026b032c 100644 --- a/gui/src/shared/daemon-rpc-types.ts +++ b/gui/src/shared/daemon-rpc-types.ts @@ -14,6 +14,7 @@ export interface ILocation { mullvadExitIp: boolean; hostname?: string; bridgeHostname?: string; + entryHostname?: string; provider?: string; } |
