Adjust Signer title colours
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user