Delete unused DisconnectAll modal (#8599)

feature/default_network_editable
Whymarrh Whitby 5 years ago committed by GitHub
parent d0fcf665bb
commit 320804bb71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      app/_locales/en/messages.json
  2. 9
      app/_locales/it/messages.json
  3. 54
      ui/app/components/app/modals/disconnect-all/disconnect-all.component.js
  4. 20
      ui/app/components/app/modals/disconnect-all/disconnect-all.container.js
  5. 1
      ui/app/components/app/modals/disconnect-all/index.js
  6. 38
      ui/app/components/app/modals/disconnect-all/index.scss
  7. 2
      ui/app/components/app/modals/index.scss
  8. 28
      ui/app/components/app/modals/modal.js

@ -462,15 +462,6 @@
"details": { "details": {
"message": "Details" "message": "Details"
}, },
"disconnectAll": {
"message": "Disconnect All"
},
"disconnectAllModalDescription": {
"message": "Are you sure? You will be disconnected from all sites on all accounts."
},
"disconnectAllAccountsQuestion": {
"message": "Disconnect all accounts?"
},
"directDepositEther": { "directDepositEther": {
"message": "Directly Deposit Ether" "message": "Directly Deposit Ether"
}, },

@ -384,15 +384,6 @@
"details": { "details": {
"message": "Dettagli" "message": "Dettagli"
}, },
"disconnectAll": {
"message": "Disconnetti Tutti"
},
"disconnectAllModalDescription": {
"message": "Sei sicuro? Sarai disconnesso da tutti i siti su tutti gli account."
},
"disconnectAllAccountsQuestion": {
"message": "Disconnettere tutti gli account?"
},
"directDepositEther": { "directDepositEther": {
"message": "Deposita Direttamente Ether" "message": "Deposita Direttamente Ether"
}, },

@ -1,54 +0,0 @@
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Modal from '../../modal'
import Button from '../../../ui/button'
import { DEFAULT_ROUTE } from '../../../../helpers/constants/routes'
export default class DisconnectAll extends PureComponent {
static propTypes = {
hideModal: PropTypes.func.isRequired,
disconnectAll: PropTypes.func.isRequired,
history: PropTypes.object.isRequired,
}
static contextTypes = {
t: PropTypes.func,
}
render () {
const { t } = this.context
const { hideModal, disconnectAll, history } = this.props
return (
<Modal
headerText={t('disconnectAllAccountsQuestion')}
onClose={() => hideModal()}
hideFooter
>
<div className="disconnect-all-modal">
<div className="disconnect-all-modal__description">
{ t('disconnectAllModalDescription') }
</div>
<Button
type="danger"
onClick={ () => {
disconnectAll()
hideModal()
history.push(DEFAULT_ROUTE)
}}
className=""
>
{ t('disconnectAll') }
</Button>
<Button
type="secondary"
onClick={ () => hideModal() }
className="disconnect-all-modal__cancel-button"
>
{ t('cancel') }
</Button>
</div>
</Modal>
)
}
}

@ -1,20 +0,0 @@
import { connect } from 'react-redux'
import { compose } from 'redux'
import { withRouter } from 'react-router-dom'
import withModalProps from '../../../../helpers/higher-order-components/with-modal-props'
import DisconnectAll from './disconnect-all.component'
import { clearPermissions } from '../../../../store/actions'
const mapDispatchToProps = (dispatch) => {
return {
disconnectAll: () => {
dispatch(clearPermissions())
},
}
}
export default compose(
withModalProps,
withRouter,
connect(null, mapDispatchToProps)
)(DisconnectAll)

@ -1 +0,0 @@
export { default } from './disconnect-all.container'

@ -1,38 +0,0 @@
.disconnect-all-modal {
height: 160px;
display: flex;
flex-direction: column;
justify-content: space-between;
&__description {
color: #24292E;
margin-bottom: 24px;
}
&__cancel-button {
border: none;
margin-top: 12px;
}
.btn-secondary {
border: none;
}
}
.disconnect-all-modal-container {
.modal-container__header-text {
font-family: Roboto;
font-style: normal;
font-weight: bold;
font-size: 18px;
color: #24292E;
}
.modal-container__content {
padding-bottom: 18px;
@media screen and (max-width: 575px) {
padding-bottom: 18px;
}
}
}

@ -12,6 +12,4 @@
@import './edit-approval-permission/index'; @import './edit-approval-permission/index';
@import './disconnect-all/index';
@import './new-account-modal/index'; @import './new-account-modal/index';

@ -29,7 +29,6 @@ import ConfirmDeleteNetwork from './confirm-delete-network'
import AddToAddressBookModal from './add-to-addressbook-modal' import AddToAddressBookModal from './add-to-addressbook-modal'
import EditApprovalPermission from './edit-approval-permission' import EditApprovalPermission from './edit-approval-permission'
import NewAccountModal from './new-account-modal' import NewAccountModal from './new-account-modal'
import DisconnectAll from './disconnect-all'
const modalContainerBaseStyle = { const modalContainerBaseStyle = {
transform: 'translate3d(-50%, 0, 0px)', transform: 'translate3d(-50%, 0, 0px)',
@ -167,33 +166,6 @@ const MODALS = {
}, },
}, },
DISCONNECT_ALL: {
contents: <DisconnectAll />,
mobileModalStyle: {
width: '95%',
top: '10%',
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
borderRadius: '10px',
},
laptopModalStyle: {
width: '375px',
top: '10%',
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
borderRadius: '10px',
},
contentStyle: {
borderRadius: '10px',
},
},
ACCOUNT_DETAILS: { ACCOUNT_DETAILS: {
contents: <AccountDetailsModal />, contents: <AccountDetailsModal />,
...accountModalStyle, ...accountModalStyle,

Loading…
Cancel
Save