From 320804bb714810a5b69c77d27dbea896f02fd60e Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Fri, 15 May 2020 15:32:46 -0230 Subject: [PATCH] Delete unused DisconnectAll modal (#8599) --- app/_locales/en/messages.json | 9 ---- app/_locales/it/messages.json | 9 ---- .../disconnect-all.component.js | 54 ------------------- .../disconnect-all.container.js | 20 ------- .../app/modals/disconnect-all/index.js | 1 - .../app/modals/disconnect-all/index.scss | 38 ------------- ui/app/components/app/modals/index.scss | 2 - ui/app/components/app/modals/modal.js | 28 ---------- 8 files changed, 161 deletions(-) delete mode 100644 ui/app/components/app/modals/disconnect-all/disconnect-all.component.js delete mode 100644 ui/app/components/app/modals/disconnect-all/disconnect-all.container.js delete mode 100644 ui/app/components/app/modals/disconnect-all/index.js delete mode 100644 ui/app/components/app/modals/disconnect-all/index.scss diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 78d2b8349..5e844bc97 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -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" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index aa481eb83..b0e8428a4 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -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" }, diff --git a/ui/app/components/app/modals/disconnect-all/disconnect-all.component.js b/ui/app/components/app/modals/disconnect-all/disconnect-all.component.js deleted file mode 100644 index 2d29fd9ea..000000000 --- a/ui/app/components/app/modals/disconnect-all/disconnect-all.component.js +++ /dev/null @@ -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 ( - hideModal()} - hideFooter - > -
-
- { t('disconnectAllModalDescription') } -
- - -
-
- ) - } -} diff --git a/ui/app/components/app/modals/disconnect-all/disconnect-all.container.js b/ui/app/components/app/modals/disconnect-all/disconnect-all.container.js deleted file mode 100644 index 4fc87d4df..000000000 --- a/ui/app/components/app/modals/disconnect-all/disconnect-all.container.js +++ /dev/null @@ -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) diff --git a/ui/app/components/app/modals/disconnect-all/index.js b/ui/app/components/app/modals/disconnect-all/index.js deleted file mode 100644 index 7fdfac530..000000000 --- a/ui/app/components/app/modals/disconnect-all/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './disconnect-all.container' diff --git a/ui/app/components/app/modals/disconnect-all/index.scss b/ui/app/components/app/modals/disconnect-all/index.scss deleted file mode 100644 index 8f69baade..000000000 --- a/ui/app/components/app/modals/disconnect-all/index.scss +++ /dev/null @@ -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; - } - } -} diff --git a/ui/app/components/app/modals/index.scss b/ui/app/components/app/modals/index.scss index 8b2b747ac..16cec11f9 100644 --- a/ui/app/components/app/modals/index.scss +++ b/ui/app/components/app/modals/index.scss @@ -12,6 +12,4 @@ @import './edit-approval-permission/index'; -@import './disconnect-all/index'; - @import './new-account-modal/index'; diff --git a/ui/app/components/app/modals/modal.js b/ui/app/components/app/modals/modal.js index 6bb84d469..812090f10 100644 --- a/ui/app/components/app/modals/modal.js +++ b/ui/app/components/app/modals/modal.js @@ -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: , - 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: , ...accountModalStyle,