Add time to app password and fix related text wrapping (#604)
parent
28f7ff76a4
commit
bf3ea67442
|
@ -180,21 +180,35 @@ function AppPassword({
|
||||||
)
|
)
|
||||||
}, [store, name])
|
}, [store, name])
|
||||||
|
|
||||||
|
const {contentLanguages} = store.preferences
|
||||||
|
|
||||||
|
const primaryLocale =
|
||||||
|
contentLanguages.length > 0 ? contentLanguages[0] : 'en-US'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
testID={testID}
|
testID={testID}
|
||||||
style={[styles.item, pal.border]}
|
style={[styles.item, pal.border]}
|
||||||
onPress={onDelete}
|
onPress={onDelete}
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
accessibilityLabel="Delete"
|
accessibilityLabel="Delete app password"
|
||||||
accessibilityHint="Deletes app password">
|
accessibilityHint="">
|
||||||
|
<View>
|
||||||
<Text type="md-bold" style={pal.text}>
|
<Text type="md-bold" style={pal.text}>
|
||||||
{name}
|
{name}
|
||||||
</Text>
|
</Text>
|
||||||
<View style={styles.flex1} />
|
<Text type="md" style={[pal.text, styles.pr10]} numberOfLines={1}>
|
||||||
<Text type="md" style={[pal.text, styles.pr10]}>
|
Created{' '}
|
||||||
{new Date(createdAt).toDateString()}
|
{Intl.DateTimeFormat(primaryLocale, {
|
||||||
|
year: 'numeric',
|
||||||
|
month: 'numeric',
|
||||||
|
day: 'numeric',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit',
|
||||||
|
second: '2-digit',
|
||||||
|
}).format(new Date(createdAt))}
|
||||||
</Text>
|
</Text>
|
||||||
|
</View>
|
||||||
<FontAwesomeIcon icon={['far', 'trash-can']} style={styles.trashIcon} />
|
<FontAwesomeIcon icon={['far', 'trash-can']} style={styles.trashIcon} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)
|
)
|
||||||
|
@ -246,6 +260,7 @@ const styles = StyleSheet.create({
|
||||||
item: {
|
item: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between',
|
||||||
borderBottomWidth: 1,
|
borderBottomWidth: 1,
|
||||||
paddingHorizontal: 20,
|
paddingHorizontal: 20,
|
||||||
paddingVertical: 14,
|
paddingVertical: 14,
|
||||||
|
|
Loading…
Reference in New Issue