diff options
author | Dan <danjm.com@gmail.com> | 2018-03-07 08:15:45 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-03-07 08:15:45 +0800 |
commit | 9d215bab0fe124f036d2ac41f375331c8d43b72b (patch) | |
tree | 6bbbdb2e6a2dcd5948ee8473cad152232c73643b /ui/app/components/modals/modal.js | |
parent | f06bca1151b07d908cd90f6efd97064e288e5f27 (diff) | |
parent | 9762a730413129361062804aa8dfc7be7cf74868 (diff) | |
download | tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.gz tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.tar.zst tangerine-wallet-browser-9d215bab0fe124f036d2ac41f375331c8d43b72b.zip |
Merge branch 'master' into i18n
Diffstat (limited to 'ui/app/components/modals/modal.js')
-rw-r--r-- | ui/app/components/modals/modal.js | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/ui/app/components/modals/modal.js b/ui/app/components/modals/modal.js index ea6ac5135..7d4089ab3 100644 --- a/ui/app/components/modals/modal.js +++ b/ui/app/components/modals/modal.js @@ -19,6 +19,7 @@ const ShapeshiftDepositTxModal = require('./shapeshift-deposit-tx-modal.js') const HideTokenConfirmationModal = require('./hide-token-confirmation-modal') const CustomizeGasModal = require('../customize-gas-modal') const NotifcationModal = require('./notification-modal') +const ConfirmResetAccount = require('./notification-modals/confirm-reset-account') const accountModalStyle = { mobileModalStyle: { @@ -79,6 +80,7 @@ const MODALS = { contents: [ h(DepositEtherModal, {}, []), ], + onHide: (props) => props.hideWarning(), mobileModalStyle: { width: '100%', height: '100%', @@ -201,6 +203,18 @@ const MODALS = { }, }, + CONFIRM_RESET_ACCOUNT: { + contents: h(ConfirmResetAccount), + mobileModalStyle: { + width: '95%', + top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh', + }, + laptopModalStyle: { + width: '473px', + top: 'calc(33% + 45px)', + }, + }, + NEW_ACCOUNT: { contents: [ h(NewAccountModal, {}, []), @@ -272,6 +286,10 @@ function mapDispatchToProps (dispatch) { hideModal: () => { dispatch(actions.hideModal()) }, + hideWarning: () => { + dispatch(actions.hideWarning()) + }, + } } @@ -294,7 +312,12 @@ Modal.prototype.render = function () { { className: 'modal', keyboard: false, - onHide: () => { this.onHide() }, + onHide: () => { + if (modal.onHide) { + modal.onHide(this.props) + } + this.onHide() + }, ref: (ref) => { this.modalRef = ref }, |