From bf3ea67442857b62d29c74ba0739f31a79b0f7b7 Mon Sep 17 00:00:00 2001 From: Ollie H Date: Tue, 9 May 2023 10:02:55 -0700 Subject: [PATCH] Add time to app password and fix related text wrapping (#604) --- src/view/screens/AppPasswords.tsx | 33 ++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/view/screens/AppPasswords.tsx b/src/view/screens/AppPasswords.tsx index a4bea68f..cb1896b4 100644 --- a/src/view/screens/AppPasswords.tsx +++ b/src/view/screens/AppPasswords.tsx @@ -180,21 +180,35 @@ function AppPassword({ ) }, [store, name]) + const {contentLanguages} = store.preferences + + const primaryLocale = + contentLanguages.length > 0 ? contentLanguages[0] : 'en-US' + return ( - - {name} - - - - {new Date(createdAt).toDateString()} - + accessibilityLabel="Delete app password" + accessibilityHint=""> + + + {name} + + + Created{' '} + {Intl.DateTimeFormat(primaryLocale, { + year: 'numeric', + month: 'numeric', + day: 'numeric', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + }).format(new Date(createdAt))} + + ) @@ -246,6 +260,7 @@ const styles = StyleSheet.create({ item: { flexDirection: 'row', alignItems: 'center', + justifyContent: 'space-between', borderBottomWidth: 1, paddingHorizontal: 20, paddingVertical: 14,