mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Delete unused DisconnectAll modal (#8599)
This commit is contained in:
parent
d0fcf665bb
commit
320804bb71
@ -462,15 +462,6 @@
|
||||
"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": {
|
||||
"message": "Directly Deposit Ether"
|
||||
},
|
||||
|
@ -384,15 +384,6 @@
|
||||
"details": {
|
||||
"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": {
|
||||
"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 './disconnect-all/index';
|
||||
|
||||
@import './new-account-modal/index';
|
||||
|
@ -29,7 +29,6 @@ import ConfirmDeleteNetwork from './confirm-delete-network'
|
||||
import AddToAddressBookModal from './add-to-addressbook-modal'
|
||||
import EditApprovalPermission from './edit-approval-permission'
|
||||
import NewAccountModal from './new-account-modal'
|
||||
import DisconnectAll from './disconnect-all'
|
||||
|
||||
const modalContainerBaseStyle = {
|
||||
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: {
|
||||
contents: <AccountDetailsModal />,
|
||||
...accountModalStyle,
|
||||
|
Loading…
Reference in New Issue
Block a user