Small UI fixes (#3966)

* Load dapp visibility from localStorage

* Align MethodDecoding address svg properly

* Consolidate svg & img classes overrides

* improve isNullAddress check

* readOnly for null display

* disabled || readOnly
This commit is contained in:
Jaco Greeff
2016-12-27 12:40:33 +01:00
committed by GitHub
parent ce8d9252e7
commit 19c8e55aa9
7 changed files with 27 additions and 11 deletions

View File

@@ -14,13 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import BigNumber from 'bignumber.js';
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { createIdentityImg } from '~/api/util/identity';
import { ContractIcon } from '../Icons';
import { isNullAddress } from '~/util/validation';
import { CancelIcon, ContractIcon } from '../Icons';
import styles from './identityIcon.css';
@@ -108,19 +108,20 @@ class IdentityIcon extends Component {
return (
<ContractIcon
className={ classes }
data-address-img
style={ {
background: '#eee',
height: size,
width: size
} } />
);
} else if (new BigNumber(address).eq(0)) {
} else if (isNullAddress(address)) {
return (
<div
<CancelIcon
className={ classes }
data-address-img
style={ {
background: '#333',
display: 'inline-block',
height: size,
width: size
} } />
@@ -130,6 +131,7 @@ class IdentityIcon extends Component {
return (
<img
className={ classes }
data-address-img
height={ size }
width={ size }
src={ iconsrc } />