Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update mobile app settings screen order and add explicit QR code scanner button (#2462)
Leendert de Borst42c1565c8c5b
diff --git a/apps/mobile-app/app/(tabs)/settings/_layout.tsx b/apps/mobile-app/app/(tabs)/settings/_layout.tsxindex 51915fb1e..1c9dbbb03 100644--- a/apps/mobile-app/app/(tabs)/settings/_layout.tsx+++ b/apps/mobile-app/app/(tabs)/settings/_layout.tsx@@ -111,7 +111,7 @@ export default function SettingsLayout(): React.ReactNode {<Stack.Screenname="security/index"options={{- title: t('settings.security'),+ title: t('settings.accountSecurity'),headerBackTitle: t('common.settings'),...defaultHeaderOptions,}}diff --git a/apps/mobile-app/app/(tabs)/settings/index.tsx b/apps/mobile-app/app/(tabs)/settings/index.tsxindex 03b4b7c6f..d05b96b75 100644--- a/apps/mobile-app/app/(tabs)/settings/index.tsx+++ b/apps/mobile-app/app/(tabs)/settings/index.tsx@@ -5,7 +5,6 @@ import { Ionicons } from '@expo/vector-icons';import { router, useFocusEffect, useNavigation } from 'expo-router';import { useEffect, useRef, useState, useCallback } from 'react';import { StyleSheet, View, ScrollView, TouchableOpacity, Animated, Platform, Linking } from 'react-native';-import { useSafeAreaInsets } from 'react-native-safe-area-context';import { useApiUrl } from '@/utils/ApiUrlUtility';import { AppUnlockUtility } from '@/utils/AppUnlockUtility';@@ -37,7 +36,6 @@ export default function SettingsScreen() : React.ReactNode {const colors = useColors();const { t } = useTranslation();const { showAlert, showConfirm } = useDialog();- const insets = useSafeAreaInsets();const { shouldShowAutofillReminder } = useApp();const { getAutoLockTimeout } = useApp();const hasCapability = useCapabilities();@@ -251,6 +249,11 @@ export default function SettingsScreen() : React.ReactNode {};const styles = StyleSheet.create({+ accountSection: {+ backgroundColor: colors.accentBackground,+ borderRadius: 10,+ overflow: 'hidden',+ },betaBadge: {backgroundColor: colors.primary,borderRadius: 10,@@ -264,21 +267,19 @@ export default function SettingsScreen() : React.ReactNode {lineHeight: 14,textTransform: 'uppercase',},- fab: {- alignItems: 'center',- backgroundColor: colors.primary,- borderRadius: 28,- bottom: Platform.OS === 'ios' ? insets.bottom + 60 : 16,- elevation: 4,- height: 56,- justifyContent: 'center',- position: 'absolute',- right: 16,- shadowColor: '#000',- shadowOffset: { width: 0, height: 2 },- shadowOpacity: 0.25,- shadowRadius: 4,- width: 56,+ groupSection: {+ backgroundColor: colors.accentBackground,+ borderRadius: 10,+ marginTop: 8,+ overflow: 'hidden',+ },+ groupTitle: {+ color: colors.textMuted,+ fontSize: 13,+ fontWeight: '600',+ marginLeft: 16,+ marginTop: 24,+ textTransform: 'uppercase',},scrollContent: {paddingBottom: 80,@@ -404,74 +405,90 @@ export default function SettingsScreen() : React.ReactNode {style={styles.scrollView}><TitleContainer title={t('common.settings')} onLogoPress={registerTap} />- <UsernameDisplay />- {hasCapability(CapabilityKeys.VaultSharing) && (- <View style={styles.section}>- <TouchableOpacity- style={styles.settingItem}- onPress={() => navigate(() => router.push('/(tabs)/settings/family-sharing'))}- >- <View style={styles.settingItemIcon}>- <Ionicons name="people-outline" size={20} color={colors.text} />- </View>- <View style={styles.settingItemContent}>- <View style={styles.settingItemLabel}>- <ThemedText style={styles.settingItemLabelText}>{familySharingText.title}</ThemedText>- <View style={styles.betaBadge}>- <ThemedText style={styles.betaBadgeText}>{familySharingText.beta}</ThemedText>- </View>- </View>- <Ionicons name="chevron-forward" size={20} color={colors.textMuted} />- </View>- </TouchableOpacity>- </View>- )}-- <View style={styles.section}>- {Platform.OS === 'ios' && (+ <View style={styles.accountSection}>+ <UsernameDisplay />+ {hasCapability(CapabilityKeys.VaultSharing) && (<>+ <View style={styles.separator} /><TouchableOpacitystyle={styles.settingItem}- onPress={handleIosAutofillPress}+ onPress={() => navigate(() => router.push('/(tabs)/settings/family-sharing'))}><View style={styles.settingItemIcon}>- <Ionicons name="key-outline" size={20} color={colors.text} />+ <Ionicons name="people-outline" size={20} color={colors.text} /></View><View style={styles.settingItemContent}>- <ThemedText style={styles.settingItemText}>{t('settings.autofill')}</ThemedText>- {shouldShowAutofillReminder && (- <View style={styles.settingItemBadge}>- <ThemedText style={styles.settingItemBadgeText}>1</ThemedText>+ <View style={styles.settingItemLabel}>+ <ThemedText style={styles.settingItemLabelText}>{familySharingText.title}</ThemedText>+ <View style={styles.betaBadge}>+ <ThemedText style={styles.betaBadgeText}>{familySharingText.beta}</ThemedText></View>- )}+ </View><Ionicons name="chevron-forward" size={20} color={colors.textMuted} /></View></TouchableOpacity>- <View style={styles.separator} /></>)}+ <View style={styles.separator} />+ <TouchableOpacity+ testID="qr-scanner-link"+ style={styles.settingItem}+ onPress={() => navigate(() => router.push('/(tabs)/settings/qr-scanner'))}+ >+ <View style={styles.settingItemIcon}>+ <Ionicons name="qr-code-outline" size={20} color={colors.text} />+ </View>+ <View style={styles.settingItemContent}>+ <ThemedText style={styles.settingItemText}>{t('settings.qrScanner.scanningMessage')}</ThemedText>+ <Ionicons name="chevron-forward" size={20} color={colors.textMuted} />+ </View>+ </TouchableOpacity>+ </View>++ <ThemedText style={styles.groupTitle}>{t('settings.groups.autofill')}</ThemedText>+ <View style={styles.groupSection}>+ {Platform.OS === 'ios' && (+ <TouchableOpacity+ style={styles.settingItem}+ onPress={handleIosAutofillPress}+ >+ <View style={styles.settingItemIcon}>+ <Ionicons name="key-outline" size={20} color={colors.text} />+ </View>+ <View style={styles.settingItemContent}>+ <ThemedText style={styles.settingItemText}>{t('settings.autofill')}</ThemedText>+ {shouldShowAutofillReminder && (+ <View style={styles.settingItemBadge}>+ <ThemedText style={styles.settingItemBadgeText}>1</ThemedText>+ </View>+ )}+ <Ionicons name="chevron-forward" size={20} color={colors.textMuted} />+ </View>+ </TouchableOpacity>+ )}{Platform.OS === 'android' && (- <>- <TouchableOpacity- style={styles.settingItem}- onPress={handleAndroidAutofillPress}- >- <View style={styles.settingItemIcon}>- <Ionicons name="key-outline" size={20} color={colors.text} />- </View>- <View style={styles.settingItemContent}>- <ThemedText style={styles.settingItemText}>{t('settings.autofill')}</ThemedText>- {shouldShowAutofillReminder && (- <View style={styles.settingItemBadge}>- <ThemedText style={styles.settingItemBadgeText}>1</ThemedText>- </View>- )}- <Ionicons name="chevron-forward" size={20} color={colors.textMuted} />- </View>- </TouchableOpacity>- <View style={styles.separator} />- </>+ <TouchableOpacity+ style={styles.settingItem}+ onPress={handleAndroidAutofillPress}+ >+ <View style={styles.settingItemIcon}>+ <Ionicons name="key-outline" size={20} color={colors.text} />+ </View>+ <View style={styles.settingItemContent}>+ <ThemedText style={styles.settingItemText}>{t('settings.autofill')}</ThemedText>+ {shouldShowAutofillReminder && (+ <View style={styles.settingItemBadge}>+ <ThemedText style={styles.settingItemBadgeText}>1</ThemedText>+ </View>+ )}+ <Ionicons name="chevron-forward" size={20} color={colors.textMuted} />+ </View>+ </TouchableOpacity>)}+ </View>++ <ThemedText style={styles.groupTitle}>{t('settings.security')}</ThemedText>+ <View style={styles.groupSection}><TouchableOpacitystyle={styles.settingItem}onPress={handleVaultUnlockPress}@@ -527,20 +544,22 @@ export default function SettingsScreen() : React.ReactNode {</TouchableOpacity><View style={styles.separator} /><TouchableOpacity+ testID="security-settings-link"style={styles.settingItem}- onPress={handleLanguagePress}+ onPress={() => router.push('/(tabs)/settings/security')}><View style={styles.settingItemIcon}>- <Ionicons name="language" size={20} color={colors.text} />+ <Ionicons name="shield-checkmark" size={20} color={colors.text} /></View><View style={styles.settingItemContent}>- <ThemedText style={styles.settingItemText}>{t('settings.language')}</ThemedText>+ <ThemedText style={styles.settingItemText}>{t('settings.accountSecurity')}</ThemedText><Ionicons name="chevron-forward" size={20} color={colors.textMuted} /></View></TouchableOpacity></View>- <View style={styles.section}>+ <ThemedText style={styles.groupTitle}>{t('settings.groups.generators')}</ThemedText>+ <View style={styles.groupSection}><TouchableOpacitystyle={styles.settingItem}onPress={handlePasswordGeneratorPress}@@ -566,7 +585,10 @@ export default function SettingsScreen() : React.ReactNode {<Ionicons name="chevron-forward" size={20} color={colors.textMuted} /></View></TouchableOpacity>- <View style={styles.separator} />+ </View>++ <ThemedText style={styles.groupTitle}>{t('navigation.vault')}</ThemedText>+ <View style={styles.groupSection}><TouchableOpacitystyle={styles.settingItem}onPress={() => router.push('/(tabs)/settings/import-export')}@@ -579,20 +601,34 @@ export default function SettingsScreen() : React.ReactNode {<Ionicons name="chevron-forward" size={20} color={colors.textMuted} /></View></TouchableOpacity>- <View style={styles.separator} />+ </View>++ <ThemedText style={styles.groupTitle}>{t('settings.groups.general')}</ThemedText>+ <View style={styles.groupSection}><TouchableOpacity- testID="security-settings-link"style={styles.settingItem}- onPress={() => router.push('/(tabs)/settings/security')}+ onPress={handleLanguagePress}><View style={styles.settingItemIcon}>- <Ionicons name="shield-checkmark" size={20} color={colors.text} />+ <Ionicons name="language" size={20} color={colors.text} /></View><View style={styles.settingItemContent}>- <ThemedText style={styles.settingItemText}>{t('settings.security')}</ThemedText>+ <ThemedText style={styles.settingItemText}>{t('settings.language')}</ThemedText><Ionicons name="chevron-forward" size={20} color={colors.textMuted} /></View></TouchableOpacity>+ <View style={styles.separator} />+ <TouchableOpacity+ style={styles.settingItem}+ onPress={logoutUserInitiated}+ >+ <View style={styles.settingItemIcon}>+ <Ionicons name="log-out" size={20} color={colors.primary} />+ </View>+ <View style={styles.settingItemContent}>+ <ThemedText style={[styles.settingItemText, { color: colors.primary }]}>{t('common.logout')}</ThemedText>+ </View>+ </TouchableOpacity></View>{isDeveloperToolsEnabled && (@@ -613,20 +649,6 @@ export default function SettingsScreen() : React.ReactNode {</View>)}- <View style={styles.section}>- <TouchableOpacity- style={styles.settingItem}- onPress={logoutUserInitiated}- >- <View style={styles.settingItemIcon}>- <Ionicons name="log-out" size={20} color={colors.primary} />- </View>- <View style={styles.settingItemContent}>- <ThemedText style={[styles.settingItemText, { color: colors.primary }]}>{t('common.logout')}</ThemedText>- </View>- </TouchableOpacity>- </View>-<TouchableOpacity style={styles.versionContainer} onPress={registerTap} activeOpacity={1}><ThemedText style={styles.versionText}><ThemedText style={styles.versionLabel}>{t('settings.appVersion')}:</ThemedText> {AppInfo.VERSION}@@ -639,14 +661,6 @@ export default function SettingsScreen() : React.ReactNode {</TouchableOpacity></Animated.ScrollView>- {/* Floating Action Button for QR Scanner - shown for testing both options */}- <TouchableOpacity- style={styles.fab}- onPress={() => router.push('/(tabs)/settings/qr-scanner')}- activeOpacity={0.8}- >- <Ionicons name="qr-code-outline" size={32} color={colors.primarySurfaceText} />- </TouchableOpacity></ThemedContainer>);}\ No newline at end of filediff --git a/apps/mobile-app/app/(tabs)/settings/security/index.tsx b/apps/mobile-app/app/(tabs)/settings/security/index.tsxindex 56c380006..f7aea7d99 100644--- a/apps/mobile-app/app/(tabs)/settings/security/index.tsx+++ b/apps/mobile-app/app/(tabs)/settings/security/index.tsx@@ -59,7 +59,7 @@ export default function SecuritySettingsScreen() : React.ReactNode {return (<ThemedContainer testID="security-settings-screen"><ThemedScrollView>- <SettingsHeader title={t('settings.security')} description={t('settings.securitySettings.description')} icon="shield-checkmark" />+ <SettingsHeader title={t('settings.accountSecurity')} description={t('settings.securitySettings.description')} icon="shield-checkmark" /><View style={styles.section}><TouchableOpacitytestID="change-password-link"diff --git a/apps/mobile-app/components/ui/UsernameDisplay.tsx b/apps/mobile-app/components/ui/UsernameDisplay.tsxindex 08e273d64..9db5886ff 100644--- a/apps/mobile-app/components/ui/UsernameDisplay.tsx+++ b/apps/mobile-app/components/ui/UsernameDisplay.tsx@@ -23,8 +23,7 @@ export function UsernameDisplay(): React.ReactNode {borderRadius: 10,flexDirection: 'row',gap: 12,- paddingHorizontal: 16,- paddingVertical: 12,+ padding: 16,},textContainer: {flex: 1,diff --git a/core/i18n/locales/en.json b/core/i18n/locales/en.jsonindex 6dc1787c2..b3bfcfe4a 100644--- a/core/i18n/locales/en.json+++ b/core/i18n/locales/en.json@@ -1224,6 +1224,7 @@},"globalSettings": "Global Settings","groups": {+ "autofill": "Autofill","general": "General","generators": "Generators"},