mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-11 01:28:10 +00:00
Added progress action for verify
This commit is contained in:
parent
bc0238403b
commit
68a8307b49
@ -1,5 +1,5 @@
|
||||
/* @flow */
|
||||
|
||||
export const SIGN_SUCCESS: 'sign__verify__sign__success' = 'sign__verify__sign__success';
|
||||
export const SIGN_PROGRESS: 'sign__verify__sign_progress' = 'sign__verify__sign_progress';
|
||||
export const VERIFY_PROGRESS: 'sign__verify__verify_progress' = 'sign__verify__verify_progress';
|
||||
export const CLEAR: 'sign__verify__sign__clear' = 'sign__verify__sign__clear';
|
@ -117,6 +117,7 @@ const getColor = (inputState) => {
|
||||
};
|
||||
|
||||
const TrezorAction = styled.div`
|
||||
display: ${props => (props.action ? 'flex' : 'none')};
|
||||
align-items: center;
|
||||
margin: 0px 10px;
|
||||
padding: 0 14px 0 5px;
|
||||
@ -126,7 +127,7 @@ const TrezorAction = styled.div`
|
||||
color: ${colors.WHITE};
|
||||
border-radius: 5px;
|
||||
line-height: 37px;
|
||||
z-index: 10001;
|
||||
z-index: 10002;
|
||||
transform: translate(-1px, -1px);
|
||||
`;
|
||||
|
||||
@ -164,6 +165,9 @@ const TextArea = ({
|
||||
<TopLabel>{topLabel}</TopLabel>
|
||||
)}
|
||||
<StyledTextarea
|
||||
spellCheck="false"
|
||||
autoCorrect="off"
|
||||
autoCapitalize="off"
|
||||
maxRows={maxRows}
|
||||
rows={rows}
|
||||
className={className}
|
||||
@ -178,11 +182,9 @@ const TextArea = ({
|
||||
borderColor={getColor(state)}
|
||||
trezorAction={trezorAction}
|
||||
/>
|
||||
{trezorAction && (
|
||||
<TrezorAction>
|
||||
<TrezorAction action={trezorAction}>
|
||||
<ArrowUp />{trezorAction}
|
||||
</TrezorAction>
|
||||
)}
|
||||
{bottomText && (
|
||||
<BottomText
|
||||
color={getColor(state)}
|
||||
|
@ -112,7 +112,7 @@ const TrezorAction = styled.div`
|
||||
color: ${colors.WHITE};
|
||||
border-radius: 5px;
|
||||
line-height: 37px;
|
||||
z-index: 10001;
|
||||
z-index: 10002;
|
||||
transform: translate(-1px, -1px);
|
||||
`;
|
||||
|
||||
|
@ -10,6 +10,7 @@ export type State = {
|
||||
export const initialState: State = {
|
||||
signature: '',
|
||||
isSignProgress: false,
|
||||
isVerifyProgress: false,
|
||||
};
|
||||
|
||||
export default (state: State = initialState, action: Action): State => {
|
||||
@ -27,6 +28,7 @@ export default (state: State = initialState, action: Action): State => {
|
||||
};
|
||||
|
||||
case SIGN_VERIFY.VERIFY_PROGRESS:
|
||||
console.log('action', action);
|
||||
return {
|
||||
...state,
|
||||
isVerifyProgress: action.isVerifyProgress,
|
||||
|
@ -116,7 +116,9 @@ class SignVerify extends Component<Props, State> {
|
||||
const {
|
||||
signVerifyActions,
|
||||
signature,
|
||||
modal,
|
||||
} = this.props;
|
||||
console.log('modal', modal);
|
||||
return (
|
||||
<Content>
|
||||
<Title>Sign & Verify</Title>
|
||||
@ -187,6 +189,15 @@ class SignVerify extends Component<Props, State> {
|
||||
state={(this.state.verifyAddress && validateAddress(this.state.verifyAddress)) ? 'error' : null}
|
||||
bottomText={this.state.verifyAddress !== '' ? validateAddress(this.state.verifyAddress) : null}
|
||||
isSmallText
|
||||
trezorAction={this.props.isVerifyProgress ? (
|
||||
<ActionWrapper>
|
||||
<StyledIcon
|
||||
icon={ICONS.T1}
|
||||
color={colors.WHITE}
|
||||
/>
|
||||
Check address on your Trezor
|
||||
</ActionWrapper>
|
||||
) : null}
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
@ -198,6 +209,15 @@ class SignVerify extends Component<Props, State> {
|
||||
rows={4}
|
||||
maxRows={4}
|
||||
maxLength="255"
|
||||
trezorAction={this.props.isVerifyProgress ? (
|
||||
<ActionWrapper>
|
||||
<StyledIcon
|
||||
icon={ICONS.T1}
|
||||
color={colors.WHITE}
|
||||
/>
|
||||
Check address on your Trezor
|
||||
</ActionWrapper>
|
||||
) : null}
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
|
Loading…
Reference in New Issue
Block a user