diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2019-03-22 07:03:30 +0800 |
---|---|---|
committer | Dan J Miller <danjm.com@gmail.com> | 2019-03-22 07:03:30 +0800 |
commit | 31175625b446cb5d18b17db23018bca8b14d280c (patch) | |
tree | f54e159883deef003fb281267025edf796eb8004 /ui/app/components/provider-page-container | |
parent | 7287133e15fab22299e07704206e85bc855d1064 (diff) | |
download | tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.tar tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.tar.gz tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.tar.bz2 tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.tar.lz tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.tar.xz tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.tar.zst tangerine-wallet-browser-31175625b446cb5d18b17db23018bca8b14d280c.zip |
Folder restructure (#6304)
* Remove ui/app/keychains/
* Remove ui/app/img/ (unused images)
* Move conversion-util to helpers/utils/
* Move token-util to helpers/utils/
* Move /helpers/*.js inside /helpers/utils/
* Move util tests inside /helpers/utils/
* Renameand move confirm-transaction/util.js to helpers/utils/
* Move higher-order-components to helpers/higher-order-components/
* Move infura-conversion.json to helpers/constants/
* Move all utility functions to helpers/utils/
* Move pages directory to top-level
* Move all constants to helpers/constants/
* Move metametrics inside helpers/
* Move app and root inside pages/
* Move routes inside helpers/
* Re-organize ducks/
* Move reducers to ducks/
* Move selectors inside selectors/
* Move test out of test folder
* Move action, reducer, store inside store/
* Move ui components inside ui/
* Move UI components inside ui/
* Move connected components inside components/app/
* Move i18n-helper inside helpers/
* Fix unit tests
* Fix unit test
* Move pages components
* Rename routes component
* Move reducers to ducks/index
* Fix bad path in unit test
Diffstat (limited to 'ui/app/components/provider-page-container')
8 files changed, 0 insertions, 302 deletions
diff --git a/ui/app/components/provider-page-container/index.js b/ui/app/components/provider-page-container/index.js deleted file mode 100644 index 927c35940..000000000 --- a/ui/app/components/provider-page-container/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export {default} from './provider-page-container.component' -export {default as ProviderPageContainerContent} from './provider-page-container-content' -export {default as ProviderPageContainerHeader} from './provider-page-container-header' diff --git a/ui/app/components/provider-page-container/index.scss b/ui/app/components/provider-page-container/index.scss deleted file mode 100644 index 8d35ac179..000000000 --- a/ui/app/components/provider-page-container/index.scss +++ /dev/null @@ -1,121 +0,0 @@ -.provider-approval-container { - display: flex; - - &__header { - display: flex; - flex-direction: column; - align-items: flex-end; - border-bottom: 1px solid $geyser; - padding: 9px; - } - - &__content { - display: flex; - overflow-y: auto; - flex: 1; - flex-direction: column; - justify-content: space-between; - color: #7C808E; - - h1, h2 { - color: #4A4A4A; - display: flex; - justify-content: center; - text-align: center; - } - - h2 { - font-size: 16px; - line-height: 18px; - padding: 20px; - } - - h1 { - font-size: 22px; - line-height: 26px; - padding: 20px; - } - - p { - padding: 0 40px; - text-align: center; - font-size: 12px; - line-height: 18px; - } - - a, a:hover { - color: $dodger-blue; - } - - .provider-approval-visual { - display: flex; - flex-direction: row; - justify-content: space-evenly; - position: relative; - margin: 0 32px; - - section { - display: flex; - flex-direction: column; - align-items: center; - flex: 1; - } - - h1 { - font-size: 14px; - line-height: 18px; - padding: 8px 0 0; - } - - h2 { - font-size: 10px; - line-height: 14px; - padding: 0; - color: #A2A4AC; - } - - &__check { - width: 40px; - height: 40px; - background: white url("/images/provider-approval-check.svg") no-repeat; - margin-top: 14px; - } - - &__identicon { - width: 64px; - height: 64px; - - &--default { - background-color: #777A87; - color: white; - width: 64px; - height: 64px; - border-radius: 32px; - display: flex; - align-items: center; - justify-content: center; - font-weight: bold; - } - } - - &:before { - border-top: 2px dashed #CDD1E4; - content: ""; - margin: 0 auto; - position: absolute; - top: 32px; - left: 0; - bottom: 0; - right: 0; - width: 65%; - z-index: -1; - } - } - - .secure-badge { - display: flex; - justify-content: center; - padding: 25px; - } - } -} diff --git a/ui/app/components/provider-page-container/provider-page-container-content/index.js b/ui/app/components/provider-page-container/provider-page-container-content/index.js deleted file mode 100644 index 73e491adc..000000000 --- a/ui/app/components/provider-page-container/provider-page-container-content/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default} from './provider-page-container-content.container' diff --git a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.component.js b/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.component.js deleted file mode 100644 index 268db613f..000000000 --- a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.component.js +++ /dev/null @@ -1,77 +0,0 @@ -import PropTypes from 'prop-types' -import React, {PureComponent} from 'react' -import Identicon from '../../identicon' - -export default class ProviderPageContainerContent extends PureComponent { - static propTypes = { - origin: PropTypes.string.isRequired, - selectedIdentity: PropTypes.string.isRequired, - siteImage: PropTypes.string, - siteTitle: PropTypes.string.isRequired, - } - - static contextTypes = { - t: PropTypes.func, - }; - - renderConnectVisual = () => { - const { origin, selectedIdentity, siteImage, siteTitle } = this.props - - return ( - <div className="provider-approval-visual"> - <section> - {siteImage ? ( - <img - className="provider-approval-visual__identicon" - src={siteImage} - /> - ) : ( - <i className="provider-approval-visual__identicon--default"> - {siteTitle.charAt(0).toUpperCase()} - </i> - )} - <h1>{siteTitle}</h1> - <h2>{origin}</h2> - </section> - <span className="provider-approval-visual__check" /> - <section> - <Identicon - className="provider-approval-visual__identicon" - address={selectedIdentity.address} - diameter={64} - /> - <h1>{selectedIdentity.name}</h1> - </section> - </div> - ) - } - - render () { - const { siteTitle } = this.props - const { t } = this.context - - return ( - <div className="provider-approval-container__content"> - <section> - <h2>{t('connectRequest')}</h2> - {this.renderConnectVisual()} - <h1>{t('providerRequest', [siteTitle])}</h1> - <p> - {t('providerRequestInfo')} - <br/> - <a - href="https://medium.com/metamask/introducing-privacy-mode-42549d4870fa" - target="_blank" - rel="noopener noreferrer" - > - {t('learnMore')}. - </a> - </p> - </section> - <section className="secure-badge"> - <img src="/images/mm-secure.svg" /> - </section> - </div> - ) - } -} diff --git a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.container.js b/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.container.js deleted file mode 100644 index 3ea1ce20e..000000000 --- a/ui/app/components/provider-page-container/provider-page-container-content/provider-page-container-content.container.js +++ /dev/null @@ -1,11 +0,0 @@ -import { connect } from 'react-redux' -import ProviderPageContainerContent from './provider-page-container-content.component' -import { getSelectedIdentity } from '../../../selectors' - -const mapStateToProps = (state) => { - return { - selectedIdentity: getSelectedIdentity(state), - } -} - -export default connect(mapStateToProps)(ProviderPageContainerContent) diff --git a/ui/app/components/provider-page-container/provider-page-container-header/index.js b/ui/app/components/provider-page-container/provider-page-container-header/index.js deleted file mode 100644 index 430627d3a..000000000 --- a/ui/app/components/provider-page-container/provider-page-container-header/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default} from './provider-page-container-header.component' diff --git a/ui/app/components/provider-page-container/provider-page-container-header/provider-page-container-header.component.js b/ui/app/components/provider-page-container/provider-page-container-header/provider-page-container-header.component.js deleted file mode 100644 index 41bf6c3dd..000000000 --- a/ui/app/components/provider-page-container/provider-page-container-header/provider-page-container-header.component.js +++ /dev/null @@ -1,12 +0,0 @@ -import React, {PureComponent} from 'react' -import NetworkDisplay from '../../network-display' - -export default class ProviderPageContainerHeader extends PureComponent { - render () { - return ( - <div className="provider-approval-container__header"> - <NetworkDisplay colored={false} /> - </div> - ) - } -} diff --git a/ui/app/components/provider-page-container/provider-page-container.component.js b/ui/app/components/provider-page-container/provider-page-container.component.js deleted file mode 100644 index ff063166d..000000000 --- a/ui/app/components/provider-page-container/provider-page-container.component.js +++ /dev/null @@ -1,76 +0,0 @@ -import PropTypes from 'prop-types' -import React, {PureComponent} from 'react' -import { ProviderPageContainerContent, ProviderPageContainerHeader } from './' -import { PageContainerFooter } from '../page-container' - -export default class ProviderPageContainer extends PureComponent { - static propTypes = { - approveProviderRequest: PropTypes.func.isRequired, - origin: PropTypes.string.isRequired, - rejectProviderRequest: PropTypes.func.isRequired, - siteImage: PropTypes.string, - siteTitle: PropTypes.string.isRequired, - tabID: PropTypes.string.isRequired, - }; - - static contextTypes = { - t: PropTypes.func, - metricsEvent: PropTypes.func, - }; - - componentDidMount () { - this.context.metricsEvent({ - eventOpts: { - category: 'Auth', - action: 'Connect', - name: 'Popup Opened', - }, - }) - } - - onCancel = () => { - const { tabID, rejectProviderRequest } = this.props - this.context.metricsEvent({ - eventOpts: { - category: 'Auth', - action: 'Connect', - name: 'Canceled', - }, - }) - rejectProviderRequest(tabID) - } - - onSubmit = () => { - const { approveProviderRequest, tabID } = this.props - this.context.metricsEvent({ - eventOpts: { - category: 'Auth', - action: 'Connect', - name: 'Confirmed', - }, - }) - approveProviderRequest(tabID) - } - - render () { - const {origin, siteImage, siteTitle} = this.props - - return ( - <div className="page-container provider-approval-container"> - <ProviderPageContainerHeader /> - <ProviderPageContainerContent - origin={origin} - siteImage={siteImage} - siteTitle={siteTitle} - /> - <PageContainerFooter - onCancel={() => this.onCancel()} - cancelText={this.context.t('cancel')} - onSubmit={() => this.onSubmit()} - submitText={this.context.t('connect')} - submitButtonType="confirm" - /> - </div> - ) - } -} |