Skip to content

frontend: disable option to connect via tor proxy on ios #3452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Improved offline UX: added detection to show an offline warning banner and auto-reconnect when back online
- iOS: various UI improvements
- Add option to disable Bluetooth for BitBox02 Nova (non-iOS devices only)
- Disabled the option to enable Tor proxy on iOS

## v4.48.0
- Removed the BTC/sat switch from the general settings in favor of a rotating unit in the account balance.
Expand Down
1 change: 1 addition & 0 deletions frontends/web/src/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@
"buy_crypto": "Buy crypto",
"enabled_false": "Disabled",
"enabled_true": "Enabled",
"noOptionOnIos": "Not available on iOS",
"noOptions": "No options found",
"receive": "Receive {{coinCode}}",
"receive_bitcoin": "Receive Bitcoin",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

import { Dispatch, useState } from 'react';
import { useTranslation } from 'react-i18next';
import type { TProxyConfig } from '@/routes/settings/advanced-settings';
import { SettingsItem } from '@/routes/settings/components/settingsItem/settingsItem';
import { TorProxyDialog } from './tor-proxy-dialog';
import { Message } from '@/components/message/message';
import { TProxyConfig } from '@/routes/settings/advanced-settings';
import { runningInIOS } from '@/utils/env';
import styles from './enable-tor-proxy-setting.module.css';

type TProps = {
Expand All @@ -34,6 +35,15 @@ export const EnableTorProxySetting = ({ proxyConfig, onChangeConfig }: TProps) =

const proxyEnabled = proxyConfig ? proxyConfig.useProxy : false;

const isIOS = runningInIOS();
const displayedValue = (
isIOS
? t('generic.noOptionOnIos')
: proxyEnabled
? t('generic.enabled_true')
: t('generic.enabled_false')
);

return (
<>
{ showRestartMessage ? (
Expand All @@ -44,9 +54,9 @@ export const EnableTorProxySetting = ({ proxyConfig, onChangeConfig }: TProps) =
<SettingsItem
className={styles.settingItem}
settingName={t('settings.expert.useProxy')}
onClick={() => setShowTorProxyDialog(true)}
onClick={isIOS ? undefined : () => setShowTorProxyDialog(true)}
secondaryText={t('newSettings.advancedSettings.torProxy.description')}
displayedValue={proxyEnabled ? t('generic.enabled_true') : t('generic.enabled_false')}
displayedValue={displayedValue}
/>
<TorProxyDialog
open={showTorProxyDialog}
Expand Down