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: [
|
items: [
|
||||||
// { id: 11, title: 'Ulanmak düzgünleri', icon: 'document-text', hasArrow: true },
|
// { id: 11, title: 'Ulanmak düzgünleri', icon: 'document-text', hasArrow: true },
|
||||||
// { id: 12, title: 'Gizlinlik syýasaty', icon: 'lock-open', 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: 13, title: 'Programma barada', icon: 'information-circle', value: 'v1.0.0', hasArrow: false },
|
||||||
{ id: 14, title: 'Hasaby poz', icon: 'trash', hasArrow: false, color: COLORS.red },
|
{ id: 14, title: 'Hasaby poz', icon: 'trash', hasArrow: false, danger: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -106,7 +106,7 @@ const ProfileScreen = () => {
|
|||||||
handleSecuritySettings();
|
handleSecuritySettings();
|
||||||
break;
|
break;
|
||||||
case 13: // About App
|
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;
|
break;
|
||||||
case 14: // Delete Account
|
case 14: // Delete Account
|
||||||
handleDeleteAccount();
|
handleDeleteAccount();
|
||||||
@@ -337,16 +337,16 @@ const ProfileScreen = () => {
|
|||||||
>
|
>
|
||||||
<View style={styles.profileItemLeft}>
|
<View style={styles.profileItemLeft}>
|
||||||
<View style={styles.profileItemIcon}>
|
<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>
|
</View>
|
||||||
<Text style={styles.profileItemTitle}>{item.title}</Text>
|
<Text style={item.danger ? styles.profileItemTitleDanger : styles.profileItemTitle}>{item.title}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.profileItemRight}>
|
<View style={styles.profileItemRight}>
|
||||||
{item.value && (
|
{item.value && (
|
||||||
<Text style={styles.profileItemValue}>{item.value}</Text>
|
<Text style={item.danger ? styles.profileItemValueDanger : styles.profileItemValue}>{item.value}</Text>
|
||||||
)}
|
)}
|
||||||
{item.hasArrow && (
|
{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>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@@ -550,6 +550,16 @@ const styles = StyleSheet.create({
|
|||||||
link: {
|
link: {
|
||||||
color: COLORS.primary,
|
color: COLORS.primary,
|
||||||
},
|
},
|
||||||
|
profileItemTitleDanger: {
|
||||||
|
fontSize: 16,
|
||||||
|
color: COLORS.error,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
|
profileItemValueDanger: {
|
||||||
|
fontSize: 14,
|
||||||
|
color: COLORS.error,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default ProfileScreen;
|
export default ProfileScreen;
|
||||||
Reference in New Issue
Block a user