mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-15 10:55:31 -04:00
Update emails nav structure (#771)
This commit is contained in:
27
mobile-app/app/(tabs)/(emails)/_layout.tsx
Normal file
27
mobile-app/app/(tabs)/(emails)/_layout.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { Stack } from 'expo-router';
|
||||
|
||||
export default function EmailsLayout() {
|
||||
const colors = useColors();
|
||||
|
||||
return (
|
||||
<Stack>
|
||||
<Stack.Screen
|
||||
name="index"
|
||||
options={{
|
||||
headerShown: false,
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
name="[id]"
|
||||
options={{
|
||||
title: 'Email',
|
||||
headerShown: true,
|
||||
headerStyle: {
|
||||
backgroundColor: colors.headerBackground,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ export default function TabLayout() {
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="emails"
|
||||
name="(emails)"
|
||||
options={{
|
||||
title: 'Emails',
|
||||
tabBarIcon: ({ color }) => <IconSymbol size={28} name="envelope.fill" color={color} />,
|
||||
|
||||
@@ -92,9 +92,6 @@ class EncryptionUtility {
|
||||
const ivHex = Buffer.from(iv).toString('hex');
|
||||
const tagHex = Buffer.from(tag).toString('hex');
|
||||
|
||||
console.log('ivHex: ', ivHex);
|
||||
console.log('tagHex: ', tagHex);
|
||||
|
||||
const decryptedData = await AesGcmCrypto.decrypt(
|
||||
contentBase64,
|
||||
base64Key,
|
||||
@@ -253,21 +250,14 @@ class EncryptionUtility {
|
||||
throw new Error('Encryption key not found');
|
||||
}
|
||||
|
||||
console.log('email.encryptedSymmetricKey: ', email.encryptedSymmetricKey);
|
||||
console.log('encryptionKey.PrivateKey: ', encryptionKey.PrivateKey);
|
||||
|
||||
// Decrypt symmetric key with asymmetric private key
|
||||
const symmetricKey = await EncryptionUtility.decryptWithPrivateKey(
|
||||
email.encryptedSymmetricKey,
|
||||
encryptionKey.PrivateKey
|
||||
);
|
||||
|
||||
console.log('Decrypted symmetricKey: ', symmetricKey);
|
||||
|
||||
const symmetricKeyBase64 = Buffer.from(symmetricKey).toString('base64');
|
||||
|
||||
console.log('Decrypted symmetricKeyBase64: ', symmetricKeyBase64);
|
||||
|
||||
// Create a new object to avoid mutating the original
|
||||
const decryptedEmail = { ...email };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user