Adjust Signer title colours

This commit is contained in:
Jaco Greeff 2017-09-05 13:33:57 +02:00
parent a5cc14ce8c
commit 1d8886fa7d
5 changed files with 68 additions and 71 deletions

94
js/package-lock.json generated
View File

@ -48,7 +48,7 @@
"@parity/parity.js": "1.8.7",
"@parity/shapeshift": "github:paritytech/js-shapeshift#57bbbe341528aeec8998f9eae16f4993a099c0c8",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"happypack": "3.1.0",
"lodash": "4.17.2",
"oo7": "0.5.3",
@ -72,7 +72,7 @@
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/dapp-vaults": "github:paritytech/dapp-vaults#902de463f554e951df60cc3e3f01060c7eb5bb72",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"file-saver": "1.3.3",
"react": "15.6.1",
"react-dom": "15.6.1",
@ -88,7 +88,7 @@
"@parity/dapp-account": "github:paritytech/dapp-account#18bf369ce24b78a35343d338be4c8d1486568c5f",
"@parity/dapp-addresses": "github:paritytech/dapp-addresses#29fa1592eed3e7b9931dd9d48ccb8d234bf6add4",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-addresses": {
@ -97,7 +97,7 @@
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/dapp-accounts": "github:paritytech/dapp-accounts#e674e311b199309bd23ba4a0d00b71f36c9cb528",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-chaindeploy": {
@ -115,7 +115,7 @@
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/dapp-account": "github:paritytech/dapp-account#18bf369ce24b78a35343d338be4c8d1486568c5f",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-contracts": {
@ -125,7 +125,7 @@
"@parity/dapp-account": "github:paritytech/dapp-account#18bf369ce24b78a35343d338be4c8d1486568c5f",
"@parity/dapp-accounts": "github:paritytech/dapp-accounts#e674e311b199309bd23ba4a0d00b71f36c9cb528",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-dapp-accounts": {
@ -133,7 +133,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-dapp-methods": {
@ -141,7 +141,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-dappreg": {
@ -149,7 +149,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-develop": {
@ -159,7 +159,7 @@
"@parity/dapp-contracts": "github:paritytech/dapp-contracts#f045afe814c1f43cfe2221cd75eca9209e81ad30",
"@parity/parity.js": "1.8.7",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"oo7": "0.5.3",
"oo7-parity": "0.6.8",
"oo7-react": "0.4.5",
@ -187,7 +187,7 @@
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/dapp-web": "github:paritytech/dapp-web#714443e1dae3408de1798a9ee7ff0575ebac584c",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"react-markdown": "2.4.4"
},
"dependencies": {
@ -208,7 +208,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-playground": {
@ -216,7 +216,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-registry": {
@ -224,7 +224,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"material-ui": "0.16.5"
}
},
@ -233,7 +233,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-signaturereg": {
@ -252,7 +252,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-status": {
@ -260,7 +260,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"bytes": "2.4.0",
"format-number": "2.0.1"
}
@ -270,7 +270,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-tokenreg": {
@ -289,7 +289,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-wallet": {
@ -298,7 +298,7 @@
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/dapp-account": "github:paritytech/dapp-account#18bf369ce24b78a35343d338be4c8d1486568c5f",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd"
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2"
}
},
"@parity/dapp-web": {
@ -306,7 +306,7 @@
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/shared": "github:paritytech/js-shared#94f88ae51ab0b85f79fcffe4f6e309fb848ab4a1",
"@parity/ui": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"@parity/ui": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"base32.js": "0.1.0"
}
},
@ -381,7 +381,7 @@
}
},
"@parity/ui": {
"version": "github:paritytech/js-ui#366837b52f4d0271fb1df3790b0db47ed6bf45bd",
"version": "github:paritytech/js-ui#dbc08becc35b5d3712768476271a3d26a44f58f2",
"requires": {
"@parity/api": "github:paritytech/js-api#3c913856d4fb7068643a4638cce0f752412fc179",
"@parity/etherscan": "github:paritytech/js-etherscan#6c0d4094c487a28585a317c7be5604cfaf57470d",
@ -705,7 +705,7 @@
"dev": true,
"requires": {
"define-properties": "1.1.2",
"es-abstract": "1.8.1"
"es-abstract": "1.8.2"
}
},
"arrify": {
@ -798,7 +798,7 @@
"dev": true,
"requires": {
"browserslist": "1.7.7",
"caniuse-db": "1.0.30000722",
"caniuse-db": "1.0.30000725",
"normalize-range": "0.1.2",
"num2fraction": "1.2.2",
"postcss": "5.2.17",
@ -2322,7 +2322,7 @@
"integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=",
"dev": true,
"requires": {
"caniuse-db": "1.0.30000722",
"caniuse-db": "1.0.30000725",
"electron-to-chromium": "1.3.20"
}
},
@ -2443,15 +2443,15 @@
"dev": true,
"requires": {
"browserslist": "1.7.7",
"caniuse-db": "1.0.30000722",
"caniuse-db": "1.0.30000725",
"lodash.memoize": "4.1.2",
"lodash.uniq": "4.5.0"
}
},
"caniuse-db": {
"version": "1.0.30000722",
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000722.tgz",
"integrity": "sha1-4LwgnZGleDGRA7UHSfKqfkpnKnk=",
"version": "1.0.30000725",
"resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000725.tgz",
"integrity": "sha1-IPIxPXlAHgL2GEDzlpi8jFWIEaY=",
"dev": true
},
"capture-stack-trace": {
@ -2633,9 +2633,9 @@
"integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE="
},
"ci-info": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.0.0.tgz",
"integrity": "sha1-3FKF8rTiUYIWg2gcOBwziPRuxTQ=",
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.0.1.tgz",
"integrity": "sha512-u+kVhyCfR37aSKEneBwRcsff8tCLIyBvngsqL/fgOoWJsBhSFVVRaXWUI3HuAQKu8cLawFFRxNxpDUktZUXScw==",
"dev": true
},
"cipher-base": {
@ -4062,7 +4062,7 @@
"dev": true,
"requires": {
"browserslist": "1.7.7",
"caniuse-db": "1.0.30000722",
"caniuse-db": "1.0.30000725",
"css-rule-stream": "1.1.0",
"duplexer2": "0.0.2",
"jsonfilter": "1.1.2",
@ -4552,9 +4552,9 @@
}
},
"es-abstract": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.8.1.tgz",
"integrity": "sha512-G6pkMLdmxF3dh4hbuYuQiku29rRqo9p5+iRf7mZTEELT/xZ/D9Vzg04ddlvzJuJuCmZp1WBbfbVLZEeygYNkpw==",
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.8.2.tgz",
"integrity": "sha512-dvhwFL3yjQxNNsOWx6exMlaDrRHCRGMQlnx5lsXDCZ/J7G/frgIIl94zhZSp/galVAYp7VzPi1OrAHta89/yGQ==",
"dev": true,
"requires": {
"es-to-primitive": "1.1.1",
@ -7841,7 +7841,7 @@
"integrity": "sha1-9zkzayYyNlBhqdSCcM1WrjNpMY4=",
"dev": true,
"requires": {
"ci-info": "1.0.0"
"ci-info": "1.0.1"
}
},
"is-date-object": {
@ -8177,7 +8177,7 @@
"requires": {
"abbrev": "1.0.9",
"async": "1.5.0",
"istanbul-api": "1.1.13",
"istanbul-api": "1.1.14",
"js-yaml": "3.6.1",
"mkdirp": "0.5.1",
"nopt": "3.0.6",
@ -8186,16 +8186,16 @@
}
},
"istanbul-api": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.13.tgz",
"integrity": "sha1-cZf2RBNgDr3+xjR6LcPU4D+X7Vo=",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.1.14.tgz",
"integrity": "sha1-JbxXAffGgMD//5E95G42GaOm5oA=",
"dev": true,
"requires": {
"async": "2.5.0",
"fileset": "2.0.3",
"istanbul-lib-coverage": "1.1.1",
"istanbul-lib-hook": "1.0.7",
"istanbul-lib-instrument": "1.7.5",
"istanbul-lib-instrument": "1.8.0",
"istanbul-lib-report": "1.1.1",
"istanbul-lib-source-maps": "1.2.1",
"istanbul-reports": "1.1.2",
@ -8247,9 +8247,9 @@
}
},
"istanbul-lib-instrument": {
"version": "1.7.5",
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.5.tgz",
"integrity": "sha1-rbWW+PDLi5XnOSBjUaOKWGryGx4=",
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.8.0.tgz",
"integrity": "sha1-ZvbJQhzJ7EcE928tsIS6kHiitTI=",
"dev": true,
"requires": {
"babel-generator": "6.26.0",
@ -9904,7 +9904,7 @@
"dev": true,
"requires": {
"define-properties": "1.1.2",
"es-abstract": "1.8.1",
"es-abstract": "1.8.2",
"function-bind": "1.1.1",
"has": "1.0.1"
}
@ -9926,7 +9926,7 @@
"dev": true,
"requires": {
"define-properties": "1.1.2",
"es-abstract": "1.8.1",
"es-abstract": "1.8.2",
"function-bind": "1.1.1",
"has": "1.0.1"
}

View File

@ -190,9 +190,9 @@ $modalZ: 10001;
}
.header {
height: 2em;
/* height: 2em; */
padding: 0.5em 1em;
background: rgba(0, 0, 0, 0.25);
background: #444444;
margin-bottom: 0;
&::after {
@ -219,6 +219,7 @@ $modalZ: 10001;
}
.title {
color: white;
float: left;
}

View File

@ -38,6 +38,7 @@ class Embedded extends Component {
};
static propTypes = {
accounts: PropTypes.object.isRequired,
actions: PropTypes.shape({
startConfirmRequest: PropTypes.func.isRequired,
startRejectRequest: PropTypes.func.isRequired
@ -79,39 +80,32 @@ class Embedded extends Component {
);
}
const items = pending.sort(this._sortRequests).map(this.renderPending);
return (
<div>
{ items }
{
pending
.sort(this._sortRequests)
.map(this.renderPending)
}
</div>
);
}
renderPending = (data, index) => {
const { actions, gasLimit, netVersion } = this.props;
const { accounts, actions, gasLimit, netVersion } = this.props;
const { date, id, isSending, payload, origin } = data;
const Handler = this.pluginStore.findHandler(payload);
const transaction = payload.sendTransaction || payload.signTransaction;
let Handler;
// if (Handler) {
// return (
// <Handler
// gasLimit={ gasLimit }
// id={ id }
// isSending={ isSending }
// key={ id }
// netVersion={ netVersion }
// onConfirm={ actions.startConfirmRequest }
// onReject={ actions.startRejectRequest }
// payload={ payload }
// />
// );
// }
if (transaction) {
Handler = this.pluginStore.findHandler(payload, accounts[transaction.from]);
}
return (
<RequestPending
className={ styles.request }
date={ date }
elementRequest={ Handler }
focus={ index === 0 }
gasLimit={ gasLimit }
id={ id }
@ -134,9 +128,11 @@ class Embedded extends Component {
function mapStateToProps (state) {
const { gasLimit, netVersion } = state.nodeStatus;
const { accounts } = state.personal;
const { actions, signer } = state;
return {
accounts,
actions,
gasLimit,
netVersion,

View File

@ -29,9 +29,9 @@ export default class PluginStore {
this.components.push(Component);
}
findHandler (payload) {
findHandler (payload, account) {
return this.components.find((component) => {
return component.isHandler(payload);
return component.isHandler(payload, account);
});
}

View File

@ -82,4 +82,4 @@ ReactDOM.render(
// testing, priceTicker gist
injectExternalScript('https://cdn.rawgit.com/jacogr/396fc583e81b9404e21195a48dc862ca/raw/33e5058a4c0028cf9acf4b0662d75298e41ca6fa/priceTicker.js');
// testing, signer plugin
injectExternalScript('https://cdn.rawgit.com/paritytech/plugin-sign-qr/master/dist.js');
injectExternalScript('https://rawgit.com/paritytech/plugin-sign-qr/master/dist.js');