remove unused section scss (#9146)

feature/default_network_editable
Brad Decker 4 years ago committed by GitHub
parent 85e658993b
commit f3ba18d79f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/e2e/ethereum-on.spec.js
  2. 6
      test/e2e/from-import-ui.spec.js
  3. 2
      test/e2e/incremental-security.spec.js
  4. 2
      test/e2e/metamask-ui.spec.js
  5. 2
      test/e2e/permissions.spec.js
  6. 2
      test/e2e/signature-request.spec.js
  7. 63
      ui/app/components/app/account-panel.js
  8. 2
      ui/app/components/app/index.scss
  9. 1
      ui/app/components/app/modals/export-private-key-modal/export-private-key-modal.component.js
  10. 1
      ui/app/components/ui/qr-code/index.js
  11. 25
      ui/app/components/ui/qr-code/index.scss
  12. 17
      ui/app/components/ui/qr-code/qr-code.js
  13. 1
      ui/app/components/ui/readonly-input/index.js
  14. 8
      ui/app/components/ui/readonly-input/index.scss
  15. 5
      ui/app/components/ui/readonly-input/readonly-input.js
  16. 22
      ui/app/css/base-styles.scss
  17. 1
      ui/app/css/itcss/components/index.scss
  18. 4
      ui/app/css/itcss/components/modal.scss
  19. 426
      ui/app/css/itcss/components/sections.scss
  20. 8
      ui/app/css/itcss/tools/utilities.scss
  21. 1
      ui/app/pages/mobile-sync/mobile-sync.component.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'))

@ -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)

@ -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'))

@ -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'))

@ -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'))

@ -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'))

@ -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 (
<div
className="identity-panel flex-row flex-space-between"
style={{ flex: '1 0 auto', cursor: panelState.onClick ? 'pointer' : undefined }}
onClick={panelState.onClick}
>
<div className="identicon-wrapper flex-column select-none">
<Identicon address={panelState.identiconKey} />
<span className="font-small">{panelState.identiconLabel.substring(0, 7) + '...'}</span>
</div>
<div className="identity-data flex-column flex-justify-center flex-grow select-none">
{panelState.attributes.map((attr, index) => (
<div className="flex-row flex-space-between" key={index}>
<label className="font-small no-select">{attr.key}</label>
<span className="font-small">{attr.value}</span>
</div>
))}
</div>
</div>
)
}
}
function balanceOrFaucetingIndication (account) {
return {
key: 'BALANCE',
value: formatBalance(account.balance),
}
}

@ -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';

@ -146,7 +146,6 @@ export default class ExportPrivateKeyModal extends Component {
<span className="account-name">{name}</span>
<ReadOnlyInput
wrapperClass="ellip-address-wrapper"
inputClass="qr-ellip-address ellip-address"
value={checksumAddress(address)}
/>
<div className="account-modal-divider" />

@ -0,0 +1 @@
export { default } from './qr-code'

@ -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;
}
}

@ -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 (
<div className="div flex-column flex-center">
<div className="qr-code">
{
Array.isArray(message)
? (
<div className="message-container">
<div className="qr-code__message-container">
{props.Qr.message.map((message, index) => (
<div className="qr-message" key={index}>
<div className="qr_code__message" key={index}>
{message}
</div>
))}
</div>
)
: message && (
<div className="qr-header">
<div className="qr-code__header">
{message}
</div>
)
@ -45,21 +45,20 @@ function QrCodeView (props) {
{
props.warning
? (props.warning && (
<span className="error flex-center">
<span className="qr_code__error">
{props.warning}
</span>
))
: null
}
<div
className="div qr-wrapper"
className="qr-code__wrapper"
dangerouslySetInnerHTML={{
__html: qrImage.createTableTag(4),
}}
/>
<ReadOnlyInput
wrapperClass="ellip-address-wrapper"
inputClass="qr-ellip-address"
value={checksumAddress(data)}
/>
</div>

@ -0,0 +1 @@
export { default } from './readonly-input'

@ -0,0 +1,8 @@
.readonly-input {
&__input {
direction: ltr;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
}

@ -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 (
<div className={wrapperClass}>
<div className={classnames('readonly-input', wrapperClass)}>
<InputType
className={inputClass}
className={classnames('readonly-input__input', inputClass)}
value={value}
readOnly
onFocus={(event) => event.target.select()}

@ -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;

@ -12,7 +12,6 @@
@import './loading-overlay';
// Tx List and Sections
@import './sections';
@import './menu';
@import './gas-slider';
@import './tab-bar';

@ -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;
}

@ -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 */

@ -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;
}

@ -369,7 +369,6 @@ export default class MobileSyncPage extends Component {
{t('syncWithMobileScanThisCode')}
</label>
<div
className="div qr-wrapper"
style={{
display: 'flex',
justifyContent: 'center',

Loading…
Cancel
Save