diff options
4 files changed, 27 insertions, 21 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/VpnSettingsView.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/VpnSettingsView.tsx index 829e15ea19..5a6a442030 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/VpnSettingsView.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/VpnSettingsView.tsx @@ -1,10 +1,6 @@ -import { sprintf } from 'sprintf-js'; - -import { strings } from '../../../../shared/constants'; import { messages } from '../../../../shared/gettext'; import { RoutePath } from '../../../../shared/routes'; import { useHistory } from '../../../lib/history'; -import { useTunnelProtocol } from '../../../lib/relay-settings-hooks'; import { AppNavigationHeader } from '../..'; import CustomDnsSettings from '../../CustomDnsSettings'; import { BackAction } from '../../KeyboardNavigation'; @@ -27,6 +23,7 @@ import { EnableIpv6, KillSwitchInfo, LockdownMode, + OpenVpnSettingsButton, TunnelProtocolSetting, WireguardSettingsButton, } from './components'; @@ -101,23 +98,6 @@ export function VpnSettingsView() { ); } -function OpenVpnSettingsButton() { - const tunnelProtocol = useTunnelProtocol(); - - return ( - <NavigationListItem to={RoutePath.openVpnSettings} disabled={tunnelProtocol === 'wireguard'}> - <NavigationListItem.Label> - {sprintf( - // TRANSLATORS: %(openvpn)s will be replaced with the string "OpenVPN" - messages.pgettext('vpn-settings-view', '%(openvpn)s settings'), - { openvpn: strings.openvpn }, - )} - </NavigationListItem.Label> - <NavigationListItem.Icon icon="chevron-right" /> - </NavigationListItem> - ); -} - function IpOverrideButton() { return ( <NavigationListItem to={RoutePath.settingsImport}> diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/index.ts b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/index.ts index c18736fb20..51e04fd565 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/index.ts +++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/index.ts @@ -5,5 +5,6 @@ export * from './dns-blockers'; export * from './enable-ipv6'; export * from './kill-switch-info'; export * from './lockdown-mode'; +export * from './open-vpn-settings-button'; export * from './tunnel-protocol-setting'; export * from './wireguard-settings-button'; diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/OpenVpnSettingsButton.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/OpenVpnSettingsButton.tsx new file mode 100644 index 0000000000..1d9022ec53 --- /dev/null +++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/OpenVpnSettingsButton.tsx @@ -0,0 +1,24 @@ +import { sprintf } from 'sprintf-js'; + +import { strings } from '../../../../../../shared/constants'; +import { messages } from '../../../../../../shared/gettext'; +import { RoutePath } from '../../../../../../shared/routes'; +import { useTunnelProtocol } from '../../../../../lib/relay-settings-hooks'; +import { NavigationListItem } from '../../../../NavigationListItem'; + +export function OpenVpnSettingsButton() { + const tunnelProtocol = useTunnelProtocol(); + + return ( + <NavigationListItem to={RoutePath.openVpnSettings} disabled={tunnelProtocol === 'wireguard'}> + <NavigationListItem.Label> + {sprintf( + // TRANSLATORS: %(openvpn)s will be replaced with the string "OpenVPN" + messages.pgettext('vpn-settings-view', '%(openvpn)s settings'), + { openvpn: strings.openvpn }, + )} + </NavigationListItem.Label> + <NavigationListItem.Icon icon="chevron-right" /> + </NavigationListItem> + ); +} diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/index.ts b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/index.ts new file mode 100644 index 0000000000..fd6c4de4a8 --- /dev/null +++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/index.ts @@ -0,0 +1 @@ +export * from './OpenVpnSettingsButton'; |
