diff --git a/test/e2e/ethereum-on.spec.js b/test/e2e/ethereum-on.spec.js
index e7412ac68..361579cd2 100644
--- a/test/e2e/ethereum-on.spec.js
+++ b/test/e2e/ethereum-on.spec.js
@@ -89,7 +89,7 @@ describe('MetaMask', function () {
})
it('gets the current accounts address', async function () {
- const addressInput = await driver.findElement(By.css('.qr-ellip-address'))
+ const addressInput = await driver.findElement(By.css('.readonly-input__input'))
publicAddress = await addressInput.getAttribute('value')
const accountModal = await driver.findElement(By.css('span .modal'))
diff --git a/test/e2e/from-import-ui.spec.js b/test/e2e/from-import-ui.spec.js
index 7a112c722..78bdd0352 100644
--- a/test/e2e/from-import-ui.spec.js
+++ b/test/e2e/from-import-ui.spec.js
@@ -99,10 +99,10 @@ describe('Using MetaMask with an existing account', function () {
it('shows the correct account address', async function () {
await driver.clickElement(By.css('[data-testid="account-options-menu-button"]'))
await driver.clickElement(By.css('[data-testid="account-options-menu__account-details"]'))
- await driver.findVisibleElement(By.css('.qr-wrapper'))
+ await driver.findVisibleElement(By.css('.qr-code__wrapper'))
await driver.delay(regularDelayMs)
- const [address] = await driver.findElements(By.css('input.qr-ellip-address'))
+ const [address] = await driver.findElements(By.css('.readonly-input__input'))
assert.equal(await address.getAttribute('value'), testAddress)
await driver.clickElement(By.css('.account-modal-close'))
@@ -112,7 +112,7 @@ describe('Using MetaMask with an existing account', function () {
it('shows a QR code for the account', async function () {
await driver.clickElement(By.css('[data-testid="account-options-menu-button"]'))
await driver.clickElement(By.css('[data-testid="account-options-menu__account-details"]'))
- await driver.findVisibleElement(By.css('.qr-wrapper'))
+ await driver.findVisibleElement(By.css('.qr-code__wrapper'))
const detailModal = await driver.findElement(By.css('span .modal'))
await driver.delay(regularDelayMs)
diff --git a/test/e2e/incremental-security.spec.js b/test/e2e/incremental-security.spec.js
index 82e3fc0e0..a6482c58d 100644
--- a/test/e2e/incremental-security.spec.js
+++ b/test/e2e/incremental-security.spec.js
@@ -95,7 +95,7 @@ describe('MetaMask', function () {
})
it('gets the current accounts address', async function () {
- const addressInput = await driver.findElement(By.css('.qr-ellip-address'))
+ const addressInput = await driver.findElement(By.css('.readonly-input__input'))
publicAddress = await addressInput.getAttribute('value')
const accountModal = await driver.findElement(By.css('span .modal'))
diff --git a/test/e2e/metamask-ui.spec.js b/test/e2e/metamask-ui.spec.js
index 15d0198cd..d501bdb3a 100644
--- a/test/e2e/metamask-ui.spec.js
+++ b/test/e2e/metamask-ui.spec.js
@@ -121,7 +121,7 @@ describe('MetaMask', function () {
it('shows the QR code for the account', async function () {
await driver.clickElement(By.css('[data-testid="account-options-menu-button"]'))
await driver.clickElement(By.css('[data-testid="account-options-menu__account-details"]'))
- await driver.findVisibleElement(By.css('.qr-wrapper'))
+ await driver.findVisibleElement(By.css('.qr-code__wrapper'))
await driver.delay(regularDelayMs)
const accountModal = await driver.findElement(By.css('span .modal'))
diff --git a/test/e2e/permissions.spec.js b/test/e2e/permissions.spec.js
index 8ec86b3cb..3d45e4477 100644
--- a/test/e2e/permissions.spec.js
+++ b/test/e2e/permissions.spec.js
@@ -90,7 +90,7 @@ describe('MetaMask', function () {
})
it('gets the current accounts address', async function () {
- const addressInput = await driver.findElement(By.css('.qr-ellip-address'))
+ const addressInput = await driver.findElement(By.css('.readonly-input__input'))
publicAddress = await addressInput.getAttribute('value')
const accountModal = await driver.findElement(By.css('span .modal'))
diff --git a/test/e2e/signature-request.spec.js b/test/e2e/signature-request.spec.js
index 6e2a558ec..9abac241b 100644
--- a/test/e2e/signature-request.spec.js
+++ b/test/e2e/signature-request.spec.js
@@ -124,7 +124,7 @@ describe('MetaMask', function () {
await driver.clickElement(By.css('[data-testid="account-options-menu__account-details"]'))
await driver.delay(regularDelayMs)
- const addressInput = await driver.findElement(By.css('.qr-ellip-address'))
+ const addressInput = await driver.findElement(By.css('.readonly-input__input'))
const newPublicAddress = await addressInput.getAttribute('value')
const accountModal = await driver.findElement(By.css('span .modal'))
diff --git a/ui/app/components/app/account-panel.js b/ui/app/components/app/account-panel.js
deleted file mode 100644
index 36517f474..000000000
--- a/ui/app/components/app/account-panel.js
+++ /dev/null
@@ -1,63 +0,0 @@
-import PropTypes from 'prop-types'
-import React, { Component } from 'react'
-import Identicon from '../ui/identicon'
-import { addressSummary, formatBalance } from '../../helpers/utils/util'
-
-export default class AccountPanel extends Component {
- static propTypes = {
- identity: PropTypes.object,
- account: PropTypes.object,
- isFauceting: PropTypes.bool,
- }
-
- static defaultProps = {
- identity: {},
- account: {},
- isFauceting: false,
- }
-
- render () {
- const { identity, account, isFauceting } = this.props
-
- const panelState = {
- key: `accountPanel${identity.address}`,
- identiconKey: identity.address,
- identiconLabel: identity.name || '',
- attributes: [
- {
- key: 'ADDRESS',
- value: addressSummary(identity.address),
- },
- balanceOrFaucetingIndication(account, isFauceting),
- ],
- }
-
- return (
-
-
-
- {panelState.identiconLabel.substring(0, 7) + '...'}
-
-
- {panelState.attributes.map((attr, index) => (
-
-
- {attr.value}
-
- ))}
-
-
- )
- }
-}
-
-function balanceOrFaucetingIndication (account) {
- return {
- key: 'BALANCE',
- value: formatBalance(account.balance),
- }
-}
diff --git a/ui/app/components/app/index.scss b/ui/app/components/app/index.scss
index 64136c661..69ed2bb23 100644
--- a/ui/app/components/app/index.scss
+++ b/ui/app/components/app/index.scss
@@ -24,6 +24,8 @@
@import '../ui/page-container/index';
@import '../../pages/index';
@import 'permission-page-container/index';
+@import '../ui/qr-code/index';
+@import '../ui/readonly-input/index';
@import 'selected-account/index';
@import '../ui/sender-to-recipient/index';
@import '../ui/tabs/index';
diff --git a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js b/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js
index 695762b73..318dd0d58 100644
--- a/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js
+++ b/ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js
@@ -146,7 +146,6 @@ export default class ExportPrivateKeyModal extends Component {
{name}
diff --git a/ui/app/components/ui/qr-code/index.js b/ui/app/components/ui/qr-code/index.js
new file mode 100644
index 000000000..f638ae4fb
--- /dev/null
+++ b/ui/app/components/ui/qr-code/index.js
@@ -0,0 +1 @@
+export { default } from './qr-code'
diff --git a/ui/app/components/ui/qr-code/index.scss b/ui/app/components/ui/qr-code/index.scss
new file mode 100644
index 000000000..86bd5af43
--- /dev/null
+++ b/ui/app/components/ui/qr-code/index.scss
@@ -0,0 +1,25 @@
+.qr-code {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+
+ &__message-container > div:first-child {
+ margin-top: 18px;
+ font-size: 15px;
+ color: #4d4d4d;
+ }
+
+ &__message {
+ font-size: 12px;
+ color: #f7861c;
+ }
+
+ &__error {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: #f7861c;
+ margin-bottom: 9px;
+ }
+}
diff --git a/ui/app/components/ui/qr-code.js b/ui/app/components/ui/qr-code/qr-code.js
similarity index 79%
rename from ui/app/components/ui/qr-code.js
rename to ui/app/components/ui/qr-code/qr-code.js
index 267277c01..0ddf6caa6 100644
--- a/ui/app/components/ui/qr-code.js
+++ b/ui/app/components/ui/qr-code/qr-code.js
@@ -3,8 +3,8 @@ import React from 'react'
import qrCode from 'qrcode-generator'
import { connect } from 'react-redux'
import { isHexPrefixed } from 'ethereumjs-util'
-import ReadOnlyInput from './readonly-input'
-import { checksumAddress } from '../../helpers/utils/util'
+import ReadOnlyInput from '../readonly-input/readonly-input'
+import { checksumAddress } from '../../../helpers/utils/util'
export default connect(mapStateToProps)(QrCodeView)
@@ -24,20 +24,20 @@ function QrCodeView (props) {
qrImage.make()
return (
-
+
{
Array.isArray(message)
? (
-
+
{props.Qr.message.map((message, index) => (
-
)
: message && (
-
+
{message}
)
@@ -45,21 +45,20 @@ function QrCodeView (props) {
{
props.warning
? (props.warning && (
-
+
{props.warning}
))
: null
}
diff --git a/ui/app/components/ui/readonly-input/index.js b/ui/app/components/ui/readonly-input/index.js
new file mode 100644
index 000000000..151a02ee8
--- /dev/null
+++ b/ui/app/components/ui/readonly-input/index.js
@@ -0,0 +1 @@
+export { default } from './readonly-input'
diff --git a/ui/app/components/ui/readonly-input/index.scss b/ui/app/components/ui/readonly-input/index.scss
new file mode 100644
index 000000000..9eff60bbb
--- /dev/null
+++ b/ui/app/components/ui/readonly-input/index.scss
@@ -0,0 +1,8 @@
+.readonly-input {
+ &__input {
+ direction: ltr;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 100%;
+ }
+}
diff --git a/ui/app/components/ui/readonly-input.js b/ui/app/components/ui/readonly-input/readonly-input.js
similarity index 78%
rename from ui/app/components/ui/readonly-input.js
rename to ui/app/components/ui/readonly-input/readonly-input.js
index b884da1bc..eba6fd6c2 100644
--- a/ui/app/components/ui/readonly-input.js
+++ b/ui/app/components/ui/readonly-input/readonly-input.js
@@ -1,5 +1,6 @@
import PropTypes from 'prop-types'
import React from 'react'
+import classnames from 'classnames'
export default function ReadOnlyInput (props) {
const {
@@ -13,9 +14,9 @@ export default function ReadOnlyInput (props) {
const InputType = textarea ? 'textarea' : 'input'
return (
-
+
event.target.select()}
diff --git a/ui/app/css/base-styles.scss b/ui/app/css/base-styles.scss
index 5445d2f34..8b2220f9c 100644
--- a/ui/app/css/base-styles.scss
+++ b/ui/app/css/base-styles.scss
@@ -29,6 +29,28 @@ html {
}
}
+/*
+ This error class is used in the following files still:
+ /ui/app/pages/create-account/connect-hardware/index.js
+ /ui/app/pages/create-account/import-account/json.js
+ /ui/app/pages/create-account/import-account/private-key.js
+ /ui/app/pages/first-time-flow/create-password/import-with-seed-phrase/import-with-seed-phrase.component.js
+ /ui/app/pages/keychains/restore-vault.js
+*/
+.error {
+ color: #f7861c;
+ margin-bottom: 9px;
+}
+
+/*
+ This warning class is used in the following files still:
+ /ui/app/pages/create-account/import-account/json.js
+ /ui/app/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
+*/
+.warning {
+ color: #ffae00;
+}
+
/* stylelint-disable */
#app-content {
overflow-x: hidden;
diff --git a/ui/app/css/itcss/components/index.scss b/ui/app/css/itcss/components/index.scss
index e26483b32..1936706dc 100644
--- a/ui/app/css/itcss/components/index.scss
+++ b/ui/app/css/itcss/components/index.scss
@@ -12,7 +12,6 @@
@import './loading-overlay';
// Tx List and Sections
-@import './sections';
@import './menu';
@import './gas-slider';
@import './tab-bar';
diff --git a/ui/app/css/itcss/components/modal.scss b/ui/app/css/itcss/components/modal.scss
index 7b63ffd9f..8d47c753e 100644
--- a/ui/app/css/itcss/components/modal.scss
+++ b/ui/app/css/itcss/components/modal.scss
@@ -85,12 +85,12 @@
// Account Details Modal
.account-modal-container {
- .qr-header {
+ .qr-code__header {
margin-top: 9px;
font-size: 20px;
}
- .qr-wrapper {
+ .qr-code__wrapper {
margin-top: 5px;
}
diff --git a/ui/app/css/itcss/components/sections.scss b/ui/app/css/itcss/components/sections.scss
deleted file mode 100644
index 4ddda782a..000000000
--- a/ui/app/css/itcss/components/sections.scss
+++ /dev/null
@@ -1,426 +0,0 @@
-// Old scss, do not lint - clean up later
-/* stylelint-disable */
-
-
-/*
-App Sections
- TODO: Move into separate files.
-*/
-
-/* initialize */
-textarea.twelve-word-phrase {
- padding: 12px;
- width: 300px;
- height: 140px;
- font-size: 16px;
- background: $white;
- resize: none;
-}
-
-.initialize-screen {
- width: 100%;
- z-index: $main-container-z-index;
- background: #f7f7f7;
-}
-
-.initialize-screen hr {
- width: 60px;
- margin: 12px;
- border-color: #f7861c;
- border-style: solid;
-}
-
-.initialize-screen label {
- margin-top: 20px;
-}
-
-.initialize-screen button.create-vault {
- margin-top: 40px;
-}
-
-.initialize-screen .warning {
- font-size: 14px;
- margin: 0 16px;
-}
-
-/* unlock */
-.error {
- color: #f7861c;
- margin-bottom: 9px;
-}
-
-.warning {
- color: #ffae00;
-}
-
-.lock {
- width: 50px;
- height: 50px;
-}
-
-.lock.locked {
- transform: scale(1.5);
- opacity: 0;
- transition: opacity 400ms ease-in, transform 400ms ease-in;
-}
-
-.lock.unlocked {
- transform: scale(1);
- opacity: 1;
- transition: opacity 500ms ease-out, transform 500ms ease-out, background 200ms ease-in;
-}
-
-.lock.locked .lock-top {
- transform: scaleX(1) translateX(0);
- transition: transform 250ms ease-in;
-}
-
-.lock.unlocked .lock-top {
- transform: scaleX(-1) translateX(-12px);
- transition: transform 250ms ease-in;
-}
-
-.lock.unlocked:hover {
- border-radius: 4px;
- background: #e5e5e5;
- border: 1px solid #b1b1b1;
-}
-
-.lock.unlocked:active {
- background: #c3c3c3;
-}
-
-.section-title .fa-arrow-left {
- margin: -2px 8px 0 -8px;
-}
-
-.sizing-input {
- font-size: 14px;
- height: 30px;
- padding-left: 5px;
-}
-
-/* accounts */
-
-.accounts-section {
- margin: 0 0;
-}
-
-.accounts-section .horizontal-line {
- margin: 0 18px;
-}
-
-.accounts-list-option {
- height: 120px;
-}
-
-.accounts-list-option .identicon-wrapper {
- width: 100px;
-}
-
-.unconftx-link {
- margin-top: 24px;
- cursor: pointer;
-}
-
-.unconftx-link .fa-arrow-right {
- margin: 0 -8px 0 8px;
-}
-
-/* identity panel */
-
-.identity-panel {
- font-weight: 500;
-}
-
-.identity-panel .identicon-wrapper {
- margin: 4px;
- margin-top: 8px;
- display: flex;
- align-items: center;
-}
-
-.identity-panel .identicon-wrapper span {
- margin: 0 auto;
-}
-
-.identity-panel .identity-data {
- margin: 8px 8px 8px 18px;
-}
-
-.identity-panel i {
- margin-top: 32px;
- margin-right: 6px;
- color: #b9b9b9;
-}
-
-.identity-panel .arrow-right {
- padding-left: 18px;
- width: 42px;
- min-width: 18px;
- height: 100%;
-}
-
-.identity-copy.flex-column {
- flex: 0.25 0 auto;
- justify-content: center;
-}
-
-/* accounts screen */
-
-.identity-section {
-}
-
-.identity-section .identity-panel {
- background: #e9e9e9;
- border-bottom: 1px solid #b1b1b1;
- cursor: pointer;
-}
-
-.identity-section .identity-panel.selected {
- background: $white;
- color: #f3c83e;
-}
-
-.identity-section .identity-panel.selected .identicon {
- border-color: $orange;
-}
-
-.identity-section .accounts-list-option:hover,
-.identity-section .accounts-list-option.selected {
- background: $white;
-}
-
-/* account detail screen */
-
-.account-detail-section {
- display: flex;
- flex-wrap: wrap;
- overflow-y: auto;
- flex-direction: inherit;
-}
-
-.grow-tenx {
- flex-grow: 10;
-}
-
-.name-label {
-}
-
-.unapproved-tx-icon {
- height: 16px;
- width: 16px;
- background: rgb(47, 174, 244);
- border-color: $silver-chalice;
- border-radius: 13px;
-}
-
-.edit-text {
- height: 100%;
- visibility: hidden;
-}
-
-.editing-label {
- display: flex;
- justify-content: flex-start;
- margin-left: 50px;
- margin-bottom: 2px;
- font-size: 11px;
- text-rendering: geometricPrecision;
- color: #f7861c;
-}
-
-.name-label:hover .edit-text {
- visibility: visible;
-}
-
-/* tx confirm */
-
-.unconftx-section input[type=password] {
- height: 22px;
- padding: 2px;
- margin: 12px;
- margin-bottom: 24px;
- border-radius: 4px;
- border: 2px solid #f3c83e;
- background: #faf6f0;
-}
-
-/* Info screen */
-.info-gray {
- text-transform: uppercase;
- color: $silver-chalice;
-}
-
-.icon-size {
- width: 20px;
-}
-
-.info {
- padding-bottom: 10px;
- display: inline-block;
- padding-left: 5px;
-}
-
-/* buy eth warning screen */
-.custom-radios {
- justify-content: space-around;
- align-items: center;
-}
-
-.custom-radio-selected {
- width: 17px;
- height: 17px;
- border: solid;
- border-style: double;
- border-radius: 15px;
- border-width: 5px;
- background: rgba(247, 134, 28, 1);
- border-color: #f7f7f7;
-}
-
-.custom-radio-inactive {
- width: 14px;
- height: 14px;
- border: solid;
- border-width: 1px;
- border-radius: 24px;
- border-color: $silver-chalice;
-}
-
-.radio-titles {
- color: rgba(247, 134, 28, 1);
-}
-
-.eth-warning {
- transition: opacity 400ms ease-in, transform 400ms ease-in;
-}
-
-.buy-subview {
- transition: opacity 400ms ease-in, transform 400ms ease-in;
-}
-
-.input-container:hover .edit-text {
- visibility: visible;
-}
-
-.buy-inputs {
- font-size: 13px;
- height: 20px;
- background: transparent;
- box-sizing: border-box;
- border: solid;
- border-color: transparent;
- border-width: 0.5px;
- border-radius: 2px;
-}
-
-.input-container:hover .buy-inputs {
- box-sizing: inherit;
- border: solid;
- border-color: #f7861c;
- border-width: 0.5px;
- border-radius: 2px;
-}
-
-.buy-inputs:focus {
- border: solid;
- border-color: #f7861c;
- border-width: 0.5px;
- border-radius: 2px;
-}
-
-.activeForm {
- background: #f7f7f7;
- border: none;
- border-radius: 8px 8px 0 0;
- width: 50%;
- text-align: center;
- padding-bottom: 4px;
-}
-
-.inactiveForm {
- border: none;
- border-radius: 8px 8px 0 0;
- width: 50%;
- text-align: center;
- padding-bottom: 4px;
-}
-
-.ex-coins {
- text-transform: uppercase;
- text-align: center;
- font-size: 33px;
- width: 118px;
- height: 42px;
- padding: 1px;
- color: #4d4d4d;
-}
-
-.marketinfo {
- color: $silver-chalice;
- font-size: 15px;
- line-height: 17px;
-}
-
-#fromCoin::-webkit-calendar-picker-indicator {
- display: none;
-}
-
-#coinList {
- width: 400px;
- height: 500px;
- overflow: scroll;
-}
-
-.icon-control .fa-sync {
- visibility: hidden;
-}
-
-.icon-control:hover .fa-sync {
- visibility: visible;
-}
-
-.icon-control:hover .fa-chevron-right {
- visibility: hidden;
-}
-
-.inactive {
- color: $silver-chalice;
-}
-
-.inactive button {
- background: $silver-chalice;
- color: $white;
-}
-
-.qr-ellip-address,
-.ellip-address {
- /*rtl:ignore*/
- direction: ltr;
- overflow: hidden;
- text-overflow: ellipsis;
- width: 100%;
-}
-
-.qr-header {
- font-size: 25px;
- margin-top: 40px;
-}
-
-.qr-message {
- font-size: 12px;
- color: #f7861c;
-}
-
-div.message-container > div:first-child {
- margin-top: 18px;
- font-size: 15px;
- color: #4d4d4d;
-}
-
-.pop-hover:hover {
- transform: scale(1.1);
-}
-
-/* stylelint-enable */
diff --git a/ui/app/css/itcss/tools/utilities.scss b/ui/app/css/itcss/tools/utilities.scss
index 1d0d1c463..aa80ab867 100644
--- a/ui/app/css/itcss/tools/utilities.scss
+++ b/ui/app/css/itcss/tools/utilities.scss
@@ -112,14 +112,6 @@
z-index: 1;
}
-.select-none {
- cursor: inherit;
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
.pointer {
cursor: pointer;
}
diff --git a/ui/app/pages/mobile-sync/mobile-sync.component.js b/ui/app/pages/mobile-sync/mobile-sync.component.js
index d93e64c0d..e0da0074c 100644
--- a/ui/app/pages/mobile-sync/mobile-sync.component.js
+++ b/ui/app/pages/mobile-sync/mobile-sync.component.js
@@ -369,7 +369,6 @@ export default class MobileSyncPage extends Component {
{t('syncWithMobileScanThisCode')}