From 4480eb897ab9f082d45bdb8c5dcde50e50cb6744 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Tue, 22 Apr 2025 12:36:47 +0200 Subject: [PATCH] Update emails nav structure (#771) --- .../app/{emails => (tabs)/(emails)}/[id].tsx | 0 mobile-app/app/(tabs)/(emails)/_layout.tsx | 27 +++++++++++++++++++ .../(tabs)/{emails.tsx => (emails)/index.tsx} | 0 mobile-app/app/(tabs)/_layout.tsx | 2 +- mobile-app/utils/EncryptionUtility.tsx | 10 ------- 5 files changed, 28 insertions(+), 11 deletions(-) rename mobile-app/app/{emails => (tabs)/(emails)}/[id].tsx (100%) create mode 100644 mobile-app/app/(tabs)/(emails)/_layout.tsx rename mobile-app/app/(tabs)/{emails.tsx => (emails)/index.tsx} (100%) diff --git a/mobile-app/app/emails/[id].tsx b/mobile-app/app/(tabs)/(emails)/[id].tsx similarity index 100% rename from mobile-app/app/emails/[id].tsx rename to mobile-app/app/(tabs)/(emails)/[id].tsx diff --git a/mobile-app/app/(tabs)/(emails)/_layout.tsx b/mobile-app/app/(tabs)/(emails)/_layout.tsx new file mode 100644 index 000000000..5aa341fcd --- /dev/null +++ b/mobile-app/app/(tabs)/(emails)/_layout.tsx @@ -0,0 +1,27 @@ +import { useColors } from '@/hooks/useColorScheme'; +import { Stack } from 'expo-router'; + +export default function EmailsLayout() { + const colors = useColors(); + + return ( + + + + + ); +} \ No newline at end of file diff --git a/mobile-app/app/(tabs)/emails.tsx b/mobile-app/app/(tabs)/(emails)/index.tsx similarity index 100% rename from mobile-app/app/(tabs)/emails.tsx rename to mobile-app/app/(tabs)/(emails)/index.tsx diff --git a/mobile-app/app/(tabs)/_layout.tsx b/mobile-app/app/(tabs)/_layout.tsx index 6c5ba97ac..a6cd6a830 100644 --- a/mobile-app/app/(tabs)/_layout.tsx +++ b/mobile-app/app/(tabs)/_layout.tsx @@ -63,7 +63,7 @@ export default function TabLayout() { }} /> , diff --git a/mobile-app/utils/EncryptionUtility.tsx b/mobile-app/utils/EncryptionUtility.tsx index 9461caf5c..5b8e6f216 100644 --- a/mobile-app/utils/EncryptionUtility.tsx +++ b/mobile-app/utils/EncryptionUtility.tsx @@ -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 };