mirror of https://github.com/trezor/trezor-wallet
Merge branch 'styled-components-refactor' of https://github.com/satoshilabs/trezor-wallet into styled-components-refactor
commit
6d87b2d2b2
@ -1,5 +1,7 @@
|
||||
👛 A webwallet using TREZOR as a private key storage https://wallet.trezor.io/trezor-wallet
|
||||
# TREZOR Ethereum Wallet
|
||||
|
||||
npm install / yarn
|
||||
|
||||
npm run dev / yarn run dev
|
||||
|
||||
npm run build / yarn run build
|
@ -1,37 +0,0 @@
|
||||
/* @flow */
|
||||
|
||||
|
||||
import React from 'react';
|
||||
import type { Props } from './index';
|
||||
|
||||
const Confirmation = (props: Props) => {
|
||||
if (!props.modal.opened) return null;
|
||||
const { device } = props.modal;
|
||||
|
||||
const {
|
||||
amount,
|
||||
address,
|
||||
currency,
|
||||
total,
|
||||
selectedFeeLevel,
|
||||
} = props.sendForm;
|
||||
|
||||
return (
|
||||
<div className="confirm-tx">
|
||||
<div className="header">
|
||||
<h3>Confirm transaction on { device.label } device</h3>
|
||||
<p>Details are shown on display</p>
|
||||
</div>
|
||||
<div className="content">
|
||||
<label>Send </label>
|
||||
<p>{ `${amount} ${currency}` }</p>
|
||||
<label>To</label>
|
||||
<p>{ address }</p>
|
||||
<label>Fee</label>
|
||||
<p>{ selectedFeeLevel.label }</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Confirmation;
|
@ -0,0 +1,55 @@
|
||||
import React from 'react';
|
||||
import colors from 'config/colors';
|
||||
import styled from 'styled-components';
|
||||
import P from 'components/Paragraph';
|
||||
import { H3 } from 'components/Heading';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
width: 390px;
|
||||
`;
|
||||
|
||||
const Header = styled.div`
|
||||
`;
|
||||
|
||||
const Content = styled.div`
|
||||
border-top: 1px solid ${colors.DIVIDER};
|
||||
background: ${colors.MAIN};
|
||||
padding: 24px 48px;
|
||||
`;
|
||||
|
||||
const Label = styled.div`
|
||||
font-size: 10px;
|
||||
color: ${colors.TEXT_SECONDARY};
|
||||
`;
|
||||
|
||||
const ConfirmSignTx = (props) => {
|
||||
if (!props.modal.opened) return null;
|
||||
const { device } = props.modal;
|
||||
|
||||
const {
|
||||
amount,
|
||||
address,
|
||||
currency,
|
||||
total,
|
||||
selectedFeeLevel,
|
||||
} = props.sendForm;
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
<Header>
|
||||
<H3>Confirm transaction on { device.label } device</H3>
|
||||
<P>Details are shown on display</P>
|
||||
</Header>
|
||||
<Content>
|
||||
<Label>Send </Label>
|
||||
<P>{ `${amount} ${currency}` }</P>
|
||||
<Label>To</Label>
|
||||
<P>{ address }</P>
|
||||
<Label>Fee</Label>
|
||||
<P>{ selectedFeeLevel.label }</P>
|
||||
</Content>
|
||||
</Wrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default ConfirmSignTx;
|
@ -0,0 +1,66 @@
|
||||
import React, { Component } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { H3 } from 'components/Heading';
|
||||
import P from 'components/Paragraph';
|
||||
import Button from 'components/buttons/Button';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
width: 360px;
|
||||
padding: 24px 48px;
|
||||
`;
|
||||
|
||||
const StyledP = styled(P)`
|
||||
padding: 14px 0px;
|
||||
`;
|
||||
|
||||
const StyledButton = styled(Button)`
|
||||
margin: 0 0 10px 0;
|
||||
`;
|
||||
|
||||
const Row = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 10px 0;
|
||||
`;
|
||||
|
||||
class ForgetDevice extends Component {
|
||||
componentDidMount() {
|
||||
this.keyboardHandler = this.keyboardHandler.bind(this);
|
||||
window.addEventListener('keydown', this.keyboardHandler, false);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('keydown', this.keyboardHandler, false);
|
||||
}
|
||||
|
||||
keyboardHandler(event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
this.forget();
|
||||
}
|
||||
}
|
||||
|
||||
forget() {
|
||||
if (this.props.modal.opened) {
|
||||
this.props.modalActions.onForgetSingleDevice(this.props.modal.device);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.props.modal.opened) return null;
|
||||
const { device } = this.props.modal;
|
||||
const { onCancel } = this.props.modalActions;
|
||||
return (
|
||||
<Wrapper>
|
||||
<H3>Forget { device.instanceLabel }?</H3>
|
||||
<StyledP isSmaller>Forgetting only removes the device from the list on the left, your coins are still safe and you can access them by reconnecting your TREZOR again.</StyledP>
|
||||
<Row>
|
||||
<StyledButton onClick={() => this.forget()}>Forget</StyledButton>
|
||||
<StyledButton isWhite onClick={onCancel}>Don't forget</StyledButton>
|
||||
</Row>
|
||||
</Wrapper>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ForgetDevice;
|
@ -1,17 +1,36 @@
|
||||
/* @flow */
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { H2 } from 'components/Heading';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
`;
|
||||
|
||||
const Row = styled.div`
|
||||
flex: 1;
|
||||
display: flex;
|
||||
padding: 0px 48px;
|
||||
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
const P = styled.p`
|
||||
padding: 10px 0px;
|
||||
text-align: center;
|
||||
`;
|
||||
|
||||
const Bootloader = () => (
|
||||
<section className="device-settings">
|
||||
<div className="row">
|
||||
<Wrapper>
|
||||
<Row>
|
||||
<H2>Your device is in firmware update mode</H2>
|
||||
<p>Please re-connect it</p>
|
||||
</div>
|
||||
</section>
|
||||
<P>Please re-connect it</P>
|
||||
</Row>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
export default connect(null, null)(Bootloader);
|
||||
|
Loading…
Reference in new issue