diff --git a/components/ListItem.tsx b/components/ListItem.tsx index bc507532f..ea7e2ae52 100644 --- a/components/ListItem.tsx +++ b/components/ListItem.tsx @@ -98,6 +98,8 @@ const ListItem: React.FC = React.memo( writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr', color: colors.alternativeTextColor, fontWeight: '400', + paddingVertical: switchProps ? 8 : 0, + lineHeight: 20, fontSize: 14, }, @@ -130,7 +132,7 @@ const ListItem: React.FC = React.memo( {subtitle && ( @@ -152,7 +154,9 @@ const ListItem: React.FC = React.memo( <> {chevron && } {rightIcon && } - {switchProps && } + {switchProps && ( + + )} {checkmark && ( { value: state.isViewAllWalletsSwitchEnabled, disabled: wallets.length <= 0, }} + subtitle={loc.settings.default_desc} /> - - {loc.settings.default_desc} - + {!state.isViewAllWalletsSwitchEnabled && ( { root: { backgroundColor: colors.background, }, - headerText: { - color: colors.foregroundColor, - }, }); const initializeState = useCallback(async () => { @@ -139,15 +137,6 @@ const EncryptStorage = () => { navigate('PlausibleDeniability'); }; - const renderPasscodeExplanation = () => { - return Platform.OS === 'android' && Platform.Version >= 30 ? ( - <> - - {loc.formatString(loc.settings.biometrics_fail, { type: deviceBiometricType! })} - - ) : null; - }; - return ( { {state.deviceBiometricCapable && ( <> - - {loc.settings.biometrics} - +
+ {loc.formatString(loc.settings.encrypt_use_expl, { type: deviceBiometricType! })} + {Platform.OS === 'android' && Platform.Version >= 30 && ( + {loc.formatString(loc.settings.biometrics_fail, { type: deviceBiometricType! })} + )} + + } /> - - {loc.formatString(loc.settings.encrypt_use_expl, { type: deviceBiometricType! })} - {renderPasscodeExplanation()} - - )} - - {loc.settings.encrypt_tstorage} - + +
{ dispatch({ type: ActionType.SetModalType, payload: MODAL_TYPES.SUCCESS }); success = true; } catch (error) { - presentAlert({ title: loc.errors.error, message: (error as Error).message }); + presentAlert({ message: (error as Error).message }); success = false; } } else if (state.modalType === MODAL_TYPES.ENTER_PASSWORD) { @@ -243,12 +236,11 @@ const styles = StyleSheet.create({ flex: 1, }, paddingTop: { paddingTop: 19 }, - headerText: { - fontWeight: 'bold', - fontSize: 30, - marginLeft: 17, - }, row: { minHeight: 60 }, + subtitleText: { + fontSize: 14, + marginTop: 5, + }, }); export default EncryptStorage; diff --git a/screen/settings/GeneralSettings.tsx b/screen/settings/GeneralSettings.tsx index 8d52e7aa3..080208f28 100644 --- a/screen/settings/GeneralSettings.tsx +++ b/screen/settings/GeneralSettings.tsx @@ -1,7 +1,7 @@ import { useNavigation } from '@react-navigation/native'; import React from 'react'; import { Platform, ScrollView, StyleSheet } from 'react-native'; -import { BlueCard, BlueSpacing20, BlueText } from '../../BlueComponents'; +import { BlueSpacing20 } from '../../BlueComponents'; import ListItem, { PressableWrapper } from '../../components/ListItem'; import { useTheme } from '../../components/themes'; import loc from '../../loc'; @@ -50,14 +50,10 @@ const GeneralSettings: React.FC = () => { title={loc.settings.general_continuity} Component={PressableWrapper} switch={{ onValueChange: onHandOffUseEnabledChange, value: isHandOffUseEnabled }} + subtitle={loc.settings.general_continuity_e} /> - - {loc.settings.general_continuity_e} - - ) : null} - { root: { backgroundColor: colors.background, }, - widgetsHeader: { - color: colors.foregroundColor, - }, }); useEffect(() => { @@ -130,13 +127,13 @@ const SettingsPrivacy: React.FC = () => { disabled: isLoading === SettingsPrivacySection.All, testID: 'ClipboardSwitch', }} + subtitle={ + + {loc.settings.privacy_clipboard_explanation} + + } /> - - - {loc.settings.privacy_clipboard_explanation} - - - + { disabled: isLoading === SettingsPrivacySection.All || storageIsEncrypted, testID: 'QuickActionsSwitch', }} + subtitle={ + <> + {loc.settings.privacy_quickactions_explanation} + {storageIsEncrypted && {loc.settings.encrypted_feature_disabled}} + + } /> - - {loc.settings.privacy_quickactions_explanation} - - {storageIsEncrypted && {loc.settings.encrypted_feature_disabled}} - + { disabled: isLoading === SettingsPrivacySection.All || wallets.length < 2, testID: 'TotalBalanceSwitch', }} + subtitle={{loc.total_balance_view.explanation}} /> - - {loc.total_balance_view.explanation} - - + { value: !isPrivacyBlurEnabled, disabled: isLoading === SettingsPrivacySection.All, }} + subtitle={{loc.settings.privacy_temporary_screenshots_instructions}} /> - - {loc.settings.privacy_temporary_screenshots_instructions} - + {loc.settings.privacy_do_not_track_explanation}} /> - - {loc.settings.privacy_do_not_track_explanation} - + {Platform.OS === 'ios' && ( <> - - - {loc.settings.widgets} - + +
{ value: storageIsEncrypted ? false : isWidgetBalanceDisplayAllowed, disabled: isLoading === SettingsPrivacySection.All || storageIsEncrypted, }} + subtitle={ + <> + {loc.settings.total_balance_explanation} + {storageIsEncrypted && {loc.settings.encrypted_feature_disabled}} + + } /> - - {loc.settings.total_balance_explanation} - - {storageIsEncrypted && {loc.settings.encrypted_feature_disabled}} - )} - - ); }; @@ -220,14 +216,14 @@ const styles = StyleSheet.create({ root: { flex: 1, }, - widgetsHeader: { - fontWeight: 'bold', - fontSize: 30, - marginLeft: 17, - }, + headerContainer: { paddingVertical: 16, }, + subtitleText: { + fontSize: 14, + marginTop: 5, + }, }); export default SettingsPrivacy; diff --git a/screen/settings/electrumSettings.js b/screen/settings/electrumSettings.js index 69ee1c12e..c2e62828b 100644 --- a/screen/settings/electrumSettings.js +++ b/screen/settings/electrumSettings.js @@ -416,10 +416,9 @@ export default class ElectrumSettings extends Component { value: this.state.isOfflineMode, testID: 'ElectrumConnectionEnabledSwitch', }} + subtitle={loc.settings.electrum_offline_description} /> - - {loc.settings.electrum_offline_description} - + {!this.state.isOfflineMode && this.renderElectrumSettings()} ); diff --git a/screen/settings/notificationSettings.js b/screen/settings/notificationSettings.js index ea37df5dc..366a77c79 100644 --- a/screen/settings/notificationSettings.js +++ b/screen/settings/notificationSettings.js @@ -105,14 +105,11 @@ const NotificationSettings = () => { - - {loc.settings.groundcontrol_explanation} - -