diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-02-14 02:50:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-14 02:50:19 +0800 |
commit | ee1197192f2f539d5e63c8d65f77a5cd94bbd7df (patch) | |
tree | 16917a2467eb28d2fc24212d0ad1416480b716a5 /ui/app/settings.js | |
parent | 96d40ee618fc158c0e447f770d9077ba145ef91f (diff) | |
parent | cd976a2765b9e442642faec8a985c049f8cb393b (diff) | |
download | tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.tar tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.tar.gz tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.tar.bz2 tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.tar.lz tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.tar.xz tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.tar.zst tangerine-wallet-browser-ee1197192f2f539d5e63c8d65f77a5cd94bbd7df.zip |
Merge pull request #3209 from danjm/MM-634-newui-reset-account
[NewUI] Add reset account button to new UI.
Diffstat (limited to 'ui/app/settings.js')
-rw-r--r-- | ui/app/settings.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/app/settings.js b/ui/app/settings.js index 476bad296..988ddea8d 100644 --- a/ui/app/settings.js +++ b/ui/app/settings.js @@ -250,6 +250,24 @@ class Settings extends Component { ) } + renderResetAccount () { + const { showResetAccountConfirmationModal } = this.props + + return h('div.settings__content-row', [ + h('div.settings__content-item', 'Reset Account'), + h('div.settings__content-item', [ + h('div.settings__content-item-col', [ + h('button.settings__clear-button.settings__clear-button--orange', { + onClick (event) { + event.preventDefault() + showResetAccountConfirmationModal() + }, + }, 'Reset Account'), + ]), + ]), + ]) + } + renderSettingsContent () { const { warning, isMascara } = this.props @@ -262,6 +280,7 @@ class Settings extends Component { this.renderStateLogs(), this.renderSeedWords(), !isMascara && this.renderOldUI(), + this.renderResetAccount(), this.renderBlockieOptIn(), ]) ) @@ -387,6 +406,7 @@ Settings.propTypes = { displayWarning: PropTypes.func, revealSeedConfirmation: PropTypes.func, setFeatureFlagToBeta: PropTypes.func, + showResetAccountConfirmationModal: PropTypes.func, warning: PropTypes.string, goHome: PropTypes.func, isMascara: PropTypes.bool, @@ -412,6 +432,9 @@ const mapDispatchToProps = dispatch => { return dispatch(actions.setFeatureFlag('betaUI', false, 'OLD_UI_NOTIFICATION_MODAL')) .then(() => dispatch(actions.setNetworkEndpoints(OLD_UI_NETWORK_TYPE))) }, + showResetAccountConfirmationModal: () => { + return dispatch(actions.showModal({ name: 'CONFIRM_RESET_ACCOUNT' })) + }, } } |