Refactor ProfileScreen to improve account deletion UI; update styles for danger items and remove alert for app information.
This commit is contained in:
@@ -82,8 +82,8 @@ const ProfileScreen = () => {
|
||||
items: [
|
||||
// { id: 11, title: 'Ulanmak düzgünleri', icon: 'document-text', hasArrow: true },
|
||||
// { id: 12, title: 'Gizlinlik syýasaty', icon: 'lock-open', hasArrow: true },
|
||||
{ id: 13, title: 'Programma barada', icon: 'information-circle', value: 'v1.0.0', hasArrow: true },
|
||||
{ id: 14, title: 'Hasaby poz', icon: 'trash', hasArrow: false, color: COLORS.red },
|
||||
{ id: 13, title: 'Programma barada', icon: 'information-circle', value: 'v1.0.0', hasArrow: false },
|
||||
{ id: 14, title: 'Hasaby poz', icon: 'trash', hasArrow: false, danger: true },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -106,7 +106,7 @@ const ProfileScreen = () => {
|
||||
handleSecuritySettings();
|
||||
break;
|
||||
case 13: // About App
|
||||
Alert.alert('Üns beriň', 'Programma barada maglumatlar açylýar...');
|
||||
// Alert.alert('Üns beriň', 'Programma barada maglumatlar açylýar...');
|
||||
break;
|
||||
case 14: // Delete Account
|
||||
handleDeleteAccount();
|
||||
@@ -337,16 +337,16 @@ const ProfileScreen = () => {
|
||||
>
|
||||
<View style={styles.profileItemLeft}>
|
||||
<View style={styles.profileItemIcon}>
|
||||
<Ionicons name={item.icon} size={20} color={item.color || COLORS.primary} />
|
||||
<Ionicons name={item.icon} size={20} color={item.danger ? COLORS.error : COLORS.primary} />
|
||||
</View>
|
||||
<Text style={styles.profileItemTitle}>{item.title}</Text>
|
||||
<Text style={item.danger ? styles.profileItemTitleDanger : styles.profileItemTitle}>{item.title}</Text>
|
||||
</View>
|
||||
<View style={styles.profileItemRight}>
|
||||
{item.value && (
|
||||
<Text style={styles.profileItemValue}>{item.value}</Text>
|
||||
<Text style={item.danger ? styles.profileItemValueDanger : styles.profileItemValue}>{item.value}</Text>
|
||||
)}
|
||||
{item.hasArrow && (
|
||||
<Ionicons name="chevron-forward" size={16} color={COLORS.gray[400]} />
|
||||
<Ionicons name="chevron-forward" size={16} color={item.danger ? COLORS.error : COLORS.gray[400]} />
|
||||
)}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
@@ -550,6 +550,16 @@ const styles = StyleSheet.create({
|
||||
link: {
|
||||
color: COLORS.primary,
|
||||
},
|
||||
profileItemTitleDanger: {
|
||||
fontSize: 16,
|
||||
color: COLORS.error,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
profileItemValueDanger: {
|
||||
fontSize: 14,
|
||||
color: COLORS.error,
|
||||
fontWeight: 'bold',
|
||||
},
|
||||
});
|
||||
|
||||
export default ProfileScreen;
|
||||
Reference in New Issue
Block a user