Ui 2 styling adjustments (#5534)

* Stateless components

* Adjust borders

* Stateless for status

* Externalise link colors

* css lint

* stateless

* Create ui/IconCache, replacing redux

* Update Signer buttons

* Requests background

* Adjust request styling

* Stateless components

* ParityBar background alignment
This commit is contained in:
Jaco Greeff
2017-05-02 17:50:44 +02:00
committed by GitHub
parent b57e8f6f0d
commit e7484d07aa
32 changed files with 369 additions and 403 deletions

View File

@@ -20,10 +20,9 @@ import { pick, range, uniq } from 'lodash';
import { bytesToHex } from '@parity/api/util/format';
import Contracts from '~/contracts';
import { hashToImageUrl } from '~/redux/util';
import builtinJson from '~/config/dappsBuiltin.json';
import viewsJson from '~/config/dappsViews.json';
import { IconCache } from '~/ui';
const builtinApps = [].concat(
viewsJson.map((app) => {
@@ -105,7 +104,7 @@ export function fetchBuiltinApps (api) {
app.type = app.isView
? 'view'
: 'builtin';
app.image = hashToImageUrl(imageIds[index]);
app.image = IconCache.hashToImage(imageIds[index]);
return app;
});
})
@@ -169,7 +168,7 @@ export function fetchRegistryApp (api, dappReg, appId) {
.then(([ imageId, contentId, manifestId ]) => {
const app = {
id: appId,
image: hashToImageUrl(imageId),
image: IconCache.hashToImage(imageId),
contentHash: bytesToHex(contentId).substr(2),
manifestHash: bytesToHex(manifestId).substr(2),
type: 'network',

View File

@@ -20,7 +20,7 @@ import BigNumber from 'bignumber.js';
import { sha3 } from '@parity/api/util/sha3';
import imagesEthereum from '~/../assets/images/contracts/ethereum-black-64x64.png';
import { hashToImageUrl } from '~/redux/util';
import { IconCache } from '~/ui';
const BALANCEOF_SIGNATURE = sha3('balanceOf(address)');
const ADDRESS_PADDING = range(24).map(() => '0').join('');
@@ -57,7 +57,7 @@ export function fetchTokenInfo (api, tokenregInstace, tokenIndex) {
const token = {
format: format.toString(),
index: tokenIndex,
image: hashToImageUrl(image),
image: IconCache.hashToImage(image),
id: sha3(address + tokenIndex).slice(0, 10),
address,
name,