summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOliver <oliver@mohlin.dev>2025-07-25 11:38:45 +0200
committerTobias Järvelöv <tobias.jarvelov@mullvad.net>2025-09-22 12:35:43 +0200
commitb29ef5a8dd13541e2a7106eb19340f513d047fe2 (patch)
tree805dc85f86d8bed682593da93ac5dd83c336ddbd
parent1581373669e48e0f128ff4833f1a116d9697ff24 (diff)
downloadmullvadvpn-b29ef5a8dd13541e2a7106eb19340f513d047fe2.tar.xz
mullvadvpn-b29ef5a8dd13541e2a7106eb19340f513d047fe2.zip
Move OpenVpnSettingsButton to separate folder
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/VpnSettingsView.tsx22
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/index.ts1
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/OpenVpnSettingsButton.tsx24
-rw-r--r--desktop/packages/mullvad-vpn/src/renderer/components/views/vpn-settings/components/open-vpn-settings-button/index.ts1
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';