diff options
| author | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2024-11-28 16:46:53 +0100 |
|---|---|---|
| committer | Joakim Hulthe <joakim.hulthe@mullvad.net> | 2024-11-28 16:46:53 +0100 |
| commit | 51699c6714f0d6d4d1c73330ab9bc589eee7cb14 (patch) | |
| tree | eaf0075a97161bce510b5ea233fb562c1aeca863 | |
| parent | c4f7af2e0dd19bd8b735315cb9148585421e68a3 (diff) | |
| parent | c1873022df8d1b6c2434b3bb50cb8bb76631e37e (diff) | |
| download | mullvadvpn-51699c6714f0d6d4d1c73330ab9bc589eee7cb14.tar.xz mullvadvpn-51699c6714f0d6d4d1c73330ab9bc589eee7cb14.zip | |
Merge branch 'fix-hidden-bridge-mode-entry-view'
| -rw-r--r-- | desktop/packages/mullvad-vpn/src/renderer/components/select-location/SelectLocationContainer.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/select-location/SelectLocationContainer.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/select-location/SelectLocationContainer.tsx index 1c4c8e2349..06ad9faf98 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/select-location/SelectLocationContainer.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/select-location/SelectLocationContainer.tsx @@ -28,13 +28,19 @@ export default function SelectLocationContainer() { const { setSelectLocationView } = useActions(userInterface); const [searchTerm, setSearchTerm] = useState(''); const relaySettings = useNormalRelaySettings(); + const bridgeState = useSelector((state) => state.settings.bridgeState); const locationType = useMemo(() => { - if (relaySettings?.wireguard.useMultihop) { + const multihopEnabled = + relaySettings?.tunnelProtocol !== 'openvpn' && relaySettings?.wireguard.useMultihop; + const bridgeModeEnabled = relaySettings?.tunnelProtocol === 'openvpn' && bridgeState === 'on'; + const allowEntryLocations = multihopEnabled || bridgeModeEnabled; + + if (allowEntryLocations) { return locationTypeSelector; } return LocationType.exit; - }, [locationTypeSelector, relaySettings]); + }, [locationTypeSelector, relaySettings, bridgeState]); const value = useMemo( () => ({ |
