mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 20:01:56 +03:00
added delete btn in settings screen
This commit is contained in:
parent
f7fb64bafa
commit
185a6c1552
@ -54,4 +54,8 @@ export default EStyleSheet.create({
|
||||
textButton: {
|
||||
justifyContent: 'center',
|
||||
},
|
||||
iconBtn: {
|
||||
borderRadius: 0,
|
||||
width: 50,
|
||||
},
|
||||
});
|
||||
|
@ -4,11 +4,13 @@ import { View, Text } from 'react-native';
|
||||
// Constants
|
||||
|
||||
// Components
|
||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||
import { DropdownButton } from '../../dropdownButton';
|
||||
import { TextButton } from '../../buttons';
|
||||
import { ToggleSwitch } from '../../toggleSwitch';
|
||||
// Styles
|
||||
import styles from './settingsItemStyles';
|
||||
import IconButton from '../../iconButton';
|
||||
|
||||
class SettingsItemView extends PureComponent {
|
||||
/* Props
|
||||
@ -73,6 +75,17 @@ class SettingsItemView extends PureComponent {
|
||||
/>
|
||||
);
|
||||
|
||||
case 'icon':
|
||||
return (
|
||||
<IconButton
|
||||
onPress={() => handleOnButtonPress(actionType)}
|
||||
name="trash-bin-outline"
|
||||
size={24}
|
||||
color={EStyleSheet.value('$primaryRed')}
|
||||
style={styles.iconBtn}
|
||||
/>
|
||||
);
|
||||
|
||||
default:
|
||||
return (
|
||||
<TextButton
|
||||
|
@ -251,7 +251,8 @@
|
||||
"feedback_success": "Email successfully open",
|
||||
"feedback_fail": "Email client could not open",
|
||||
"server_fail": "Server not available",
|
||||
"show_imgs": "Show Images"
|
||||
"show_imgs": "Show Images",
|
||||
"delete_account": "Delete Account"
|
||||
},
|
||||
"voters": {
|
||||
"voters_info": "Voters Info",
|
||||
|
@ -1,6 +1,8 @@
|
||||
const SHOW_HIDE_IMGS = 'show_hide_images';
|
||||
const DELETE_ACCOUNT = 'delete_account';
|
||||
// TODO: Add more settings types here
|
||||
|
||||
export default {
|
||||
SHOW_HIDE_IMGS,
|
||||
DELETE_ACCOUNT
|
||||
};
|
||||
|
@ -312,6 +312,11 @@ class SettingsContainer extends Component {
|
||||
case 'feedback':
|
||||
this._handleSendFeedback();
|
||||
break;
|
||||
|
||||
case settingsTypes.DELETE_ACCOUNT:
|
||||
console.log('delete account');
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -277,6 +277,17 @@ const SettingsScreen = ({
|
||||
actionType="feedback"
|
||||
handleOnButtonPress={handleOnButtonPress}
|
||||
/>
|
||||
<SettingsItem
|
||||
title={intl.formatMessage({
|
||||
id: 'settings.delete_account',
|
||||
})}
|
||||
text={intl.formatMessage({
|
||||
id: 'settings.delete_account',
|
||||
})}
|
||||
type="icon"
|
||||
actionType={settingsTypes.DELETE_ACCOUNT}
|
||||
handleOnButtonPress={handleOnButtonPress}
|
||||
/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</Fragment>
|
||||
|
Loading…
Reference in New Issue
Block a user