ADD: Provide explanation for disabled feature

This commit is contained in:
Marcos Rodriguez Velez 2024-05-17 08:52:17 -04:00
parent 887e655e96
commit d7d45a8a66
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7
2 changed files with 24 additions and 21 deletions

View file

@ -277,6 +277,7 @@
"encrypt_title": "Security",
"encrypt_tstorage": "Storage",
"encrypt_use": "Use {type}",
"encrypted_feature_disabled": "This feature cannot be used with encrypted storage enabled.",
"encrypt_use_expl": "{type} will be used to confirm your identity before making a transaction, unlocking, exporting, or deleting a wallet. {type} will not be used to unlock encrypted storage.",
"biometrics_fail": "If {type} is not enabled, or fails to unlock, you can use your device passcode as an alternative.",
"general": "General",

View file

@ -123,24 +123,24 @@ const SettingsPrivacy: React.FC = () => {
</Pressable>
</BlueCard>
<BlueSpacing20 />
{!storageIsEncrypted && (
<>
<ListItem
hideChevron
title={loc.settings.privacy_quickactions}
Component={TouchableWithoutFeedback}
switch={{
onValueChange: onQuickActionsValueChange,
value: isQuickActionsEnabled,
disabled: isLoading === SettingsPrivacySection.All,
testID: 'QuickActionsSwitch',
}}
/>
<BlueCard>
<BlueText>{loc.settings.privacy_quickactions_explanation}</BlueText>
</BlueCard>
</>
)}
<ListItem
hideChevron
title={loc.settings.privacy_quickactions}
Component={TouchableWithoutFeedback}
switch={{
onValueChange: onQuickActionsValueChange,
value: storageIsEncrypted ? false : isQuickActionsEnabled,
disabled: isLoading === SettingsPrivacySection.All || storageIsEncrypted,
testID: 'QuickActionsSwitch',
}}
/>
{}
<BlueCard>
<BlueText>{loc.settings.privacy_quickactions_explanation}</BlueText>
<BlueSpacing20 />
{storageIsEncrypted && <BlueText>{loc.settings.encrypted_feature_disabled}</BlueText>}
</BlueCard>
<ListItem
hideChevron
title={loc.settings.privacy_do_not_track}
@ -150,7 +150,7 @@ const SettingsPrivacy: React.FC = () => {
<BlueCard>
<BlueText>{loc.settings.privacy_do_not_track_explanation}</BlueText>
</BlueCard>
{Platform.OS === 'ios' && !storageIsEncrypted && (
{Platform.OS === 'ios' && (
<>
<BlueSpacing40 />
<Text adjustsFontSizeToFit style={[styles.widgetsHeader, styleHooks.widgetsHeader]}>
@ -162,12 +162,14 @@ const SettingsPrivacy: React.FC = () => {
Component={TouchableWithoutFeedback}
switch={{
onValueChange: onWidgetsTotalBalanceValueChange,
value: isWidgetBalanceDisplayAllowed,
disabled: isLoading === SettingsPrivacySection.All,
value: storageIsEncrypted ? false : isWidgetBalanceDisplayAllowed,
disabled: isLoading === SettingsPrivacySection.All || storageIsEncrypted,
}}
/>
<BlueCard>
<BlueText>{loc.settings.total_balance_explanation}</BlueText>
<BlueSpacing20 />
{storageIsEncrypted && <BlueText>{loc.settings.encrypted_feature_disabled}</BlueText>}
</BlueCard>
</>
)}