Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

UI tweaks (#771)

Leendert de Borstf7f687368908
diff --git a/apps/mobile-app/app/(tabs)/settings/auto-lock.tsx b/apps/mobile-app/app/(tabs)/settings/auto-lock.tsx
index 86e3cc8f6..c6400905b 100644
--- a/apps/mobile-app/app/(tabs)/settings/auto-lock.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/auto-lock.tsx
@@ -45,6 +45,7 @@ export default function AutoLockScreen() : React.ReactNode {
},
header: {
padding: 16,
+ paddingBottom: 0,
},
headerText: {
color: colors.textMuted,
diff --git a/apps/mobile-app/app/(tabs)/settings/ios-autofill.tsx b/apps/mobile-app/app/(tabs)/settings/ios-autofill.tsx
index fe97db302..72d31a87b 100644
--- a/apps/mobile-app/app/(tabs)/settings/ios-autofill.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/ios-autofill.tsx
@@ -52,6 +52,7 @@ export default function IosAutofillScreen() : React.ReactNode {
},
header: {
padding: 16,
+ paddingBottom: 0,
},
headerText: {
color: colors.textMuted,
diff --git a/apps/mobile-app/app/(tabs)/settings/security/active-sessions.tsx b/apps/mobile-app/app/(tabs)/settings/security/active-sessions.tsx
index ea7adb296..b6c3b2d5a 100644
--- a/apps/mobile-app/app/(tabs)/settings/security/active-sessions.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/security/active-sessions.tsx
@@ -57,8 +57,7 @@ export default function ActiveSessionsScreen() : React.ReactNode {
textAlign: 'center',
},
header: {
- padding: 16,
- paddingBottom: 0,
+ paddingTop: 16
},
headerText: {
color: colors.textMuted,
@@ -88,6 +87,7 @@ export default function ActiveSessionsScreen() : React.ReactNode {
borderRadius: 10,
marginBottom: 16,
padding: 16,
+ paddingBottom: 2,
},
});
diff --git a/apps/mobile-app/app/(tabs)/settings/security/auth-logs.tsx b/apps/mobile-app/app/(tabs)/settings/security/auth-logs.tsx
index 3e6723e44..3d1821390 100644
--- a/apps/mobile-app/app/(tabs)/settings/security/auth-logs.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/security/auth-logs.tsx
@@ -57,8 +57,7 @@ export default function AuthLogsScreen() : React.ReactNode {
fontWeight: '600',
},
header: {
- padding: 16,
- paddingBottom: 0,
+ paddingTop: 16,
},
headerText: {
color: colors.textMuted,
@@ -67,9 +66,6 @@ export default function AuthLogsScreen() : React.ReactNode {
loadingContainer: {
flex: 1,
},
- logDetails: {
- marginBottom: 8,
- },
logHeader: {
alignItems: 'center',
flexDirection: 'row',
@@ -81,6 +77,7 @@ export default function AuthLogsScreen() : React.ReactNode {
borderRadius: 10,
marginBottom: 16,
padding: 16,
+ paddingBottom: 8,
},
section: {
marginTop: 20,
@@ -179,7 +176,7 @@ export default function AuthLogsScreen() : React.ReactNode {
{item.isSuccess ? 'Success' : 'Failed'}
</ThemedText>
</View>
- <View style={styles.logDetails}>
+ <View>
<ThemedText style={styles.detailText}>Time: {formatDate(item.timestamp)}</ThemedText>
<ThemedText style={styles.detailText}>Device: {item.userAgent}</ThemedText>
<ThemedText style={styles.detailText}>IP Address: {item.ipAddress}</ThemedText>
diff --git a/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx b/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx
index cfa16634d..325ff7798 100644
--- a/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/security/change-password.tsx
@@ -1,4 +1,4 @@
-import { StyleSheet, View, Alert, ScrollView } from 'react-native';
+import { StyleSheet, View, Alert, ScrollView, KeyboardAvoidingView, Platform } from 'react-native';
import { useState } from 'react';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { router } from 'expo-router';
@@ -50,8 +50,7 @@ export default function ChangePasswordScreen(): React.ReactNode {
padding: 16,
},
header: {
- padding: 16,
- paddingBottom: 0,
+ paddingTop: 16,
},
headerText: {
color: colors.textMuted,
@@ -60,6 +59,9 @@ export default function ChangePasswordScreen(): React.ReactNode {
inputContainer: {
marginBottom: 16,
},
+ keyboardAvoidingView: {
+ flex: 1,
+ },
label: {
color: colors.text,
fontSize: 16,
@@ -126,56 +128,62 @@ export default function ChangePasswordScreen(): React.ReactNode {
{(isLoading) && (
<LoadingOverlay status={syncStatus.length > 0 ? syncStatus : loadingStatus ?? ''} />
)}
- <ThemedView style={styles.container}>
- <ScrollView
- contentContainerStyle={styles.contentContainer}
- >
- <View style={styles.header}>
- <ThemedText style={styles.headerText}>
- Changing your master password also changes the vault encryption keys. It is advised to periodically change your master password to keep your vaults secure.
- </ThemedText>
- </View>
- <UsernameDisplay />
- <View style={styles.form}>
- <View style={styles.inputContainer}>
- <ThemedText style={styles.label}>Current Password</ThemedText>
- <ThemedTextInput
- secureTextEntry
- value={currentPassword}
- onChangeText={setCurrentPassword}
- placeholder="Enter current password"
- />
+ <KeyboardAvoidingView
+ behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
+ style={styles.keyboardAvoidingView}
+ >
+ <ThemedView style={styles.container}>
+ <ScrollView
+ contentContainerStyle={styles.contentContainer}
+ keyboardShouldPersistTaps="handled"
+ >
+ <View style={styles.header}>
+ <ThemedText style={styles.headerText}>
+ Changing your master password also changes the vault encryption keys. It is advised to periodically change your master password to keep your vaults secure.
+ </ThemedText>
</View>
+ <UsernameDisplay />
+ <View style={styles.form}>
+ <View style={styles.inputContainer}>
+ <ThemedText style={styles.label}>Current Password</ThemedText>
+ <ThemedTextInput
+ secureTextEntry
+ value={currentPassword}
+ onChangeText={setCurrentPassword}
+ placeholder="Enter current password"
+ />
+ </View>
- <View style={styles.inputContainer}>
- <ThemedText style={styles.label}>New Password</ThemedText>
- <ThemedTextInput
- secureTextEntry
- value={newPassword}
- onChangeText={setNewPassword}
- placeholder="Enter new password"
- />
- </View>
+ <View style={styles.inputContainer}>
+ <ThemedText style={styles.label}>New Password</ThemedText>
+ <ThemedTextInput
+ secureTextEntry
+ value={newPassword}
+ onChangeText={setNewPassword}
+ placeholder="Enter new password"
+ />
+ </View>
- <View style={styles.inputContainer}>
- <ThemedText style={styles.label}>Confirm New Password</ThemedText>
- <ThemedTextInput
- secureTextEntry
- value={confirmPassword}
- onChangeText={setConfirmPassword}
- placeholder="Confirm new password"
+ <View style={styles.inputContainer}>
+ <ThemedText style={styles.label}>Confirm New Password</ThemedText>
+ <ThemedTextInput
+ secureTextEntry
+ value={confirmPassword}
+ onChangeText={setConfirmPassword}
+ placeholder="Confirm new password"
+ />
+ </View>
+
+ <ThemedButton
+ title="Change Password"
+ onPress={handleSubmit}
+ loading={isLoading}
+ style={styles.button}
/>
</View>
-
- <ThemedButton
- title="Change Password"
- onPress={handleSubmit}
- loading={isLoading}
- style={styles.button}
- />
- </View>
- </ScrollView>
- </ThemedView>
+ </ScrollView>
+ </ThemedView>
+ </KeyboardAvoidingView>
</>
);
}
\ No newline at end of file
diff --git a/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx b/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx
index 0eb72a737..11490d813 100644
--- a/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/security/delete-account.tsx
@@ -1,4 +1,4 @@
-import { StyleSheet, View, Alert, ScrollView } from 'react-native';
+import { StyleSheet, View, Alert, ScrollView, KeyboardAvoidingView, Platform } from 'react-native';
import { router } from 'expo-router';
import { useState } from 'react';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -35,9 +35,6 @@ export default function DeleteAccountScreen(): React.ReactNode {
button: {
marginTop: 16,
},
- buttonDanger: {
- backgroundColor: colors.errorBackground,
- },
container: {
flex: 1,
marginTop: 42,
@@ -57,16 +54,17 @@ export default function DeleteAccountScreen(): React.ReactNode {
padding: 20,
},
header: {
- padding: 16,
- paddingBottom: 0,
+ paddingTop: 16,
},
headerText: {
color: colors.textMuted,
fontSize: 13,
},
inputContainer: {
- marginBottom: 20,
- marginTop: 20,
+ marginTop: 10,
+ },
+ keyboardAvoidingView: {
+ flex: 1,
},
label: {
color: colors.text,
@@ -236,64 +234,72 @@ export default function DeleteAccountScreen(): React.ReactNode {
return (
<>
{isLoading && <LoadingOverlay status={loadingStatus ?? ''} />}
- <ThemedView style={styles.container}>
- <ScrollView contentContainerStyle={styles.contentContainer}>
- <View style={styles.header}>
- <ThemedText style={styles.headerText}>
- Deleting your account will immediately and permanently delete all of your data.
- </ThemedText>
- </View>
- <UsernameDisplay />
- <View style={styles.form}>
- {step === 'username' ? (
- <>
- <ThemedText style={styles.warningText}>
- Warning: This action cannot be undone. All your data will be permanently deleted.
- </ThemedText>
- <WarningItem text="All encrypted vaults which includes all of your credentials will be permanently deleted" />
- <WarningItem text="Your email aliases will be orphaned and cannot be claimed by other users" />
- <WarningItem text="Your account cannot be recovered after deletion" />
- <View style={styles.inputContainer}>
- <ThemedText style={styles.label}>Enter your username to continue</ThemedText>
- <ThemedTextInput
- value={confirmUsername}
- onChangeText={setConfirmUsername}
- placeholder="Enter username"
- autoCapitalize="none"
+ <KeyboardAvoidingView
+ behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
+ style={styles.keyboardAvoidingView}
+ >
+ <ThemedView style={styles.container}>
+ <ScrollView
+ contentContainerStyle={styles.contentContainer}
+ keyboardShouldPersistTaps="handled"
+ >
+ <View style={styles.header}>
+ <ThemedText style={styles.headerText}>
+ Deleting your account will immediately and permanently delete all of your data.
+ </ThemedText>
+ </View>
+ <UsernameDisplay />
+ <View style={styles.form}>
+ {step === 'username' ? (
+ <>
+ <ThemedText style={styles.warningText}>
+ Warning: This action cannot be undone. All your data will be permanently deleted.
+ </ThemedText>
+ <WarningItem text="All encrypted vaults which includes all of your credentials will be permanently deleted" />
+ <WarningItem text="Your email aliases will be orphaned and cannot be claimed by other users" />
+ <WarningItem text="Your account cannot be recovered after deletion" />
+ <View style={styles.inputContainer}>
+ <ThemedText style={styles.label}>Enter your username to continue</ThemedText>
+ <ThemedTextInput
+ value={confirmUsername}
+ onChangeText={setConfirmUsername}
+ placeholder="Enter username"
+ autoCapitalize="none"
+ />
+ </View>
+ <ThemedButton
+ title="Continue"
+ onPress={handleUsernameSubmit}
+ style={styles.button}
/>
- </View>
- <ThemedButton
- title="Continue"
- onPress={handleUsernameSubmit}
- style={styles.button}
- />
- </>
- ) : (
- <>
- <ThemedText style={styles.warningText}>
- Final warning: Enter your password to permanently delete your account.
- </ThemedText>
- <WarningItem text="Account deletion is irreversible and cannot be undone. Pressing the button below will delete your account immmediately and permanently." />
- <View style={styles.inputContainer}>
- <ThemedText style={styles.label}>Password</ThemedText>
- <ThemedTextInput
- secureTextEntry
- value={password}
- onChangeText={setPassword}
- placeholder="Enter password"
+ </>
+ ) : (
+ <>
+ <ThemedText style={styles.warningText}>
+ Final warning: Enter your password to permanently delete your account.
+ </ThemedText>
+ <WarningItem text="Account deletion is irreversible and cannot be undone. Pressing the button below will delete your account immmediately and permanently." />
+ <View style={styles.inputContainer}>
+ <ThemedText style={styles.label}>Password</ThemedText>
+ <ThemedTextInput
+ secureTextEntry
+ value={password}
+ onChangeText={setPassword}
+ placeholder="Enter password"
+ />
+ </View>
+ <ThemedButton
+ title="Delete Account"
+ onPress={handleDeleteAccount}
+ loading={isLoading}
+ style={styles.button}
/>
- </View>
- <ThemedButton
- title="Delete Account"
- onPress={handleDeleteAccount}
- loading={isLoading}
- style={[styles.button, styles.buttonDanger]}
- />
- </>
- )}
- </View>
- </ScrollView>
- </ThemedView>
+ </>
+ )}
+ </View>
+ </ScrollView>
+ </ThemedView>
+ </KeyboardAvoidingView>
</>
);
}
\ No newline at end of file
diff --git a/apps/mobile-app/app/(tabs)/settings/security/index.tsx b/apps/mobile-app/app/(tabs)/settings/security/index.tsx
index 729e41137..c7737adcb 100644
--- a/apps/mobile-app/app/(tabs)/settings/security/index.tsx
+++ b/apps/mobile-app/app/(tabs)/settings/security/index.tsx
@@ -7,6 +7,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { ThemedText } from '@/components/themed/ThemedText';
import { ThemedView } from '@/components/themed/ThemedView';
import { useColors } from '@/hooks/useColorScheme';
+import { SettingsHeader } from '@/components/ui/SettingsHeader';
/**
* Security settings screen.
@@ -82,6 +83,7 @@ export default function SecuritySettingsScreen() : React.ReactNode {
scrollIndicatorInsets={{ bottom: 40 }}
style={styles.scrollView}
>
+ <SettingsHeader title="Security" description="Manage your account and vault security settings." icon="shield-checkmark" />
<View style={styles.section}>
<TouchableOpacity
style={styles.settingItem}
diff --git a/apps/mobile-app/components/ui/SettingsHeader.tsx b/apps/mobile-app/components/ui/SettingsHeader.tsx
new file mode 100644
index 000000000..350868253
--- /dev/null
+++ b/apps/mobile-app/components/ui/SettingsHeader.tsx
@@ -0,0 +1,84 @@
+import React from 'react';
+import { StyleSheet, View } from 'react-native';
+import { Ionicons } from '@expo/vector-icons';
+import { LinearGradient } from 'expo-linear-gradient';
+
+import { ThemedText } from '@/components/themed/ThemedText';
+import { useColors } from '@/hooks/useColorScheme';
+
+type SettingsHeaderProps = {
+ title: string;
+ description?: string;
+ icon: keyof typeof Ionicons.glyphMap;
+};
+
+/**
+ * Settings header component.
+ * @param title - The title of the header.
+ * @param description - The description of the header.
+ * @param icon - The icon of the header.
+ * @returns The settings header component.
+ */
+export function SettingsHeader({ title, description, icon }: SettingsHeaderProps): React.ReactNode {
+ const colors = useColors();
+
+ const styles = StyleSheet.create({
+ container: {
+ backgroundColor: colors.accentBackground,
+ borderRadius: 10,
+ marginTop: 20,
+ paddingBottom: 16,
+ paddingHorizontal: 16,
+ paddingTop: 20,
+ textAlign: 'center',
+ },
+ description: {
+ color: colors.textMuted,
+ fontSize: 15,
+ lineHeight: 20,
+ textAlign: 'center',
+ },
+ gradient: {
+ alignItems: 'center',
+ borderRadius: 10,
+ justifyContent: 'center',
+ padding: 16,
+ },
+ iconContainer: {
+ alignItems: 'center',
+ borderRadius: 10,
+ shadowColor: colors.black,
+ shadowOffset: { width: 1, height: 4 },
+ shadowOpacity: 0.4,
+ shadowRadius: 2.84,
+ },
+ title: {
+ color: colors.text,
+ fontSize: 24,
+ fontWeight: 'bold',
+ lineHeight: 24,
+ marginBottom: 6,
+ marginTop: 20,
+ textAlign: 'center',
+ },
+ });
+
+ return (
+ <View style={styles.container}>
+ <View style={styles.iconContainer}>
+ <LinearGradient
+ colors={[colors.loginHeader, colors.primary]}
+ start={{ x: 0, y: 0 }}
+ end={{ x: 1, y: 1 }}
+ style={styles.gradient}
+ >
+ <Ionicons name={icon} size={48} color={colors.text} />
+ </LinearGradient>
+ </View>
+ <ThemedText style={styles.title}>{title}</ThemedText>
+ {description ? (
+ <ThemedText style={styles.description}>{description}</ThemedText>
+ ) : null}
+ </View>
+ );
+}
diff --git a/apps/mobile-app/constants/Colors.ts b/apps/mobile-app/constants/Colors.ts
index 90ca535dd..a330782c3 100644
--- a/apps/mobile-app/constants/Colors.ts
+++ b/apps/mobile-app/constants/Colors.ts
@@ -28,6 +28,7 @@ export const Colors = {
greenBackground: '#22c55e',
skeleton: '#rgba(255,255,255,0.4)',
red: '#ff0000',
+ black: '#000000',
},
dark: {
white: '#ffffff',
@@ -54,6 +55,7 @@ export const Colors = {
greenBackground: '#22c55e',
skeleton: '#rgba(255,255,255,0.2)',
red: '#ff0000',
+ black: '#000000',
},
} as const;
diff --git a/apps/mobile-app/hooks/useVaultMutate.ts b/apps/mobile-app/hooks/useVaultMutate.ts
index f67bae042..e67071a31 100644
--- a/apps/mobile-app/hooks/useVaultMutate.ts
+++ b/apps/mobile-app/hooks/useVaultMutate.ts
@@ -170,10 +170,8 @@ export function useVaultMutate() : {
const newPasswordHash = await EncryptionUtility.deriveKeyFromPassword(newPasswordPlainText, newSalt, data.encryptionType, data.encryptionSettings);
const newPasswordHashString = Buffer.from(newPasswordHash).toString('hex').toUpperCase();
- // Set new password hash locally
+ // Store the new encryption key and derivation parameters locally
try {
-
- // Store the new encryption key and derivation parameters locally
const newEncryptionKeyDerivationParams : EncryptionKeyDerivationParams = {
encryptionType: data.encryptionType,
encryptionSettings: data.encryptionSettings,