mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-28 03:08:30 +00:00
address verification different UI
This commit is contained in:
parent
b5a78be39b
commit
5282c22bc0
@ -82,9 +82,9 @@ class Modal extends Component<Props> {
|
|||||||
case "ButtonRequest_SignTx" :
|
case "ButtonRequest_SignTx" :
|
||||||
component = (<ConfirmSignTx { ...this.props } />)
|
component = (<ConfirmSignTx { ...this.props } />)
|
||||||
break;
|
break;
|
||||||
case "ButtonRequest_Address" :
|
// case "ButtonRequest_Address" :
|
||||||
component = (<ConfirmAddress { ...this.props } />)
|
// component = (<ConfirmAddress { ...this.props } />)
|
||||||
break;
|
// break;
|
||||||
case "ButtonRequest_PassphraseType" :
|
case "ButtonRequest_PassphraseType" :
|
||||||
component = (<PassphraseType { ...this.props } />)
|
component = (<PassphraseType { ...this.props } />)
|
||||||
break;
|
break;
|
||||||
|
@ -74,12 +74,21 @@ const _render = (props: Props, state: ComponentState): React$Element<string> =>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let ver = null;
|
||||||
|
if (props.modal.opened && props.modal.windowType === 'ButtonRequest_Address') {
|
||||||
|
className = 'address verifying';
|
||||||
|
address = account.address;
|
||||||
|
// ver = (<div className="confirm">Confirm address on TREZOR</div>)
|
||||||
|
button = (<div className="confirm">{ account.network } account #{ (account.index + 1) }</div>);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="receive">
|
<section className="receive">
|
||||||
{ deviceStatusNotification }
|
{ deviceStatusNotification }
|
||||||
<h2>Receive Ethereum or tokens</h2>
|
<h2>Receive Ethereum or tokens</h2>
|
||||||
|
|
||||||
<div className={ className }>
|
<div className={ className }>
|
||||||
|
{ ver }
|
||||||
<div className="value">
|
<div className="value">
|
||||||
{ address }
|
{ address }
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,6 +21,7 @@ type OwnProps = { }
|
|||||||
|
|
||||||
type StateProps = BaseStateProps & {
|
type StateProps = BaseStateProps & {
|
||||||
receive: $ElementType<State, 'receive'>,
|
receive: $ElementType<State, 'receive'>,
|
||||||
|
modal: $ElementType<State, 'modal'>,
|
||||||
}
|
}
|
||||||
|
|
||||||
type DispatchProps = BaseDispatchProps & {
|
type DispatchProps = BaseDispatchProps & {
|
||||||
@ -35,7 +36,8 @@ const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: St
|
|||||||
devices: state.connect.devices,
|
devices: state.connect.devices,
|
||||||
accounts: state.accounts,
|
accounts: state.accounts,
|
||||||
discovery: state.discovery,
|
discovery: state.discovery,
|
||||||
receive: state.receive
|
receive: state.receive,
|
||||||
|
modal: state.modal,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,17 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.verify {
|
||||||
|
position: absolute;
|
||||||
|
background: @color_white;
|
||||||
|
border: 2px solid @color_green_primary;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
margin: 0px 48px;
|
||||||
|
z-index: 10001; // bigger than modal container
|
||||||
|
}
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
// same as input (inputs.less)
|
// same as input (inputs.less)
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -85,6 +96,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.verifying {
|
||||||
|
.value {
|
||||||
|
background: @color_white;
|
||||||
|
z-index: 10001; // bigger than modal container
|
||||||
|
border-color: @color_green_primary;
|
||||||
|
border-width: 2px;
|
||||||
|
transform: translate(-1px, -1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
background: @color_white;
|
||||||
|
z-index: 10001;
|
||||||
|
width: 100%;
|
||||||
|
padding: 6px 12px;
|
||||||
|
transform: translate(-1px, -1px);
|
||||||
|
margin: 0px 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user