Skip to content

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

Update theme (#771)

Leendert de Borst4d72c7473193
diff --git a/mobile-app/app/(tabs)/(credentials)/[id].tsx b/mobile-app/app/(tabs)/(credentials)/[id].tsx
index 6bfc3db5a..d44f06566 100644
--- a/mobile-app/app/(tabs)/(credentials)/[id].tsx
+++ b/mobile-app/app/(tabs)/(credentials)/[id].tsx
@@ -8,6 +8,7 @@ import { ThemedView } from '@/components/ThemedView';
import { useDb } from '@/context/DbContext';
import { Credential } from '@/utils/types/Credential';
import SqliteClient from '@/utils/SqliteClient';
+import { ThemedScrollView } from '@/components/ThemedScrollView';
interface FormInputCopyToClipboardProps {
label: string;
@@ -91,6 +92,9 @@ export default function CredentialDetailsScreen() {
try {
const cred = await dbContext.sqliteClient!.getCredentialById(id as string);
+ if (cred?.Alias?.BirthDate) {
+ cred.Alias.BirthDate = new Date(cred.Alias.BirthDate);
+ }
setCredential(cred);
} catch (err) {
console.error('Error loading credential:', err);
@@ -126,7 +130,7 @@ export default function CredentialDetailsScreen() {
const fullName = [credential.Alias?.FirstName, credential.Alias?.LastName].filter(Boolean).join(' ');
return (
- <ScrollView style={styles.container}>
+ <ThemedScrollView style={styles.container}>
<ThemedView style={styles.header}>
{credential.Logo && (
<Image
@@ -169,7 +173,7 @@ export default function CredentialDetailsScreen() {
)}
</ThemedView>
- {(hasName || credential.Alias?.NickName) && (
+ {(hasName || credential.Alias?.NickName || credential.Alias?.BirthDate) && (
<ThemedView style={styles.section}>
<ThemedText type="subtitle">Alias</ThemedText>
{hasName && (
@@ -178,12 +182,30 @@ export default function CredentialDetailsScreen() {
value={fullName}
/>
)}
+ {credential.Alias?.FirstName && (
+ <FormInputCopyToClipboard
+ label="First Name"
+ value={credential.Alias.FirstName}
+ />
+ )}
+ {credential.Alias?.LastName && (
+ <FormInputCopyToClipboard
+ label="Last Name"
+ value={credential.Alias.LastName}
+ />
+ )}
{credential.Alias?.NickName && (
<FormInputCopyToClipboard
label="Nickname"
value={credential.Alias.NickName}
/>
)}
+ {credential.Alias?.BirthDate && !isNaN(credential.Alias.BirthDate.getTime()) && credential.Alias.BirthDate.getTime() !== new Date(0).getTime() && (
+ <FormInputCopyToClipboard
+ label="Birth Date"
+ value={credential.Alias.BirthDate.toISOString().split('T')[0]}
+ />
+ )}
</ThemedView>
)}
@@ -200,13 +222,14 @@ export default function CredentialDetailsScreen() {
</View>
</ThemedView>
)}
- </ScrollView>
+ </ThemedScrollView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
+ marginBottom: 80,
},
header: {
flexDirection: 'row',
diff --git a/mobile-app/app/(tabs)/(credentials)/index.tsx b/mobile-app/app/(tabs)/(credentials)/index.tsx
index 4bac6570f..7a6bd81fc 100644
--- a/mobile-app/app/(tabs)/(credentials)/index.tsx
+++ b/mobile-app/app/(tabs)/(credentials)/index.tsx
@@ -111,6 +111,7 @@ export default function CredentialsScreen() {
const styles = StyleSheet.create({
container: {
flex: 1,
+ marginBottom: 80,
},
content: {
flex: 1,
diff --git a/mobile-app/app/_layout.tsx b/mobile-app/app/_layout.tsx
index 081f64f89..225af40e4 100644
--- a/mobile-app/app/_layout.tsx
+++ b/mobile-app/app/_layout.tsx
@@ -31,7 +31,7 @@ const toastConfig = {
padding: 12,
borderRadius: 8,
marginHorizontal: 16,
- marginBottom: 64,
+ marginBottom: 70,
shadowColor: '#000',
shadowOffset: {
width: 0,
diff --git a/mobile-app/components/ThemedScrollView.tsx b/mobile-app/components/ThemedScrollView.tsx
new file mode 100644
index 000000000..5343dbe62
--- /dev/null
+++ b/mobile-app/components/ThemedScrollView.tsx
@@ -0,0 +1,17 @@
+import { ScrollView, StyleSheet } from 'react-native';
+
+export function ThemedScrollView({ style, lightColor, darkColor, ...otherProps }: ThemedScrollViewProps) {
+ return (
+ <ScrollView
+ style={[styles.container, style]}
+ {...otherProps}
+ />
+ );
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ marginBottom: 80,
+ },
+});