mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-05 23:59:23 +00:00
added change log and pgp signature to InstallBridge
This commit is contained in:
parent
be34d85fdd
commit
796db24890
@ -1,10 +1,13 @@
|
||||
/* @flow */
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import * as RouterActions from 'actions/RouterActions';
|
||||
|
||||
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
|
||||
import type { State, Dispatch } from 'flowtype';
|
||||
import LandingPage from './index';
|
||||
|
||||
|
||||
export type StateProps = {
|
||||
localStorage: $ElementType<State, 'localStorage'>,
|
||||
modal: $ElementType<State, 'modal'>,
|
||||
@ -34,8 +37,8 @@ const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (state: St
|
||||
devices: state.devices,
|
||||
});
|
||||
|
||||
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (/* dispatch: Dispatch */): DispatchProps => ({
|
||||
|
||||
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (dispatch: Dispatch): DispatchProps => ({
|
||||
selectFirstAvailableDevice: bindActionCreators(RouterActions.selectFirstAvailableDevice, dispatch),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(LandingPage);
|
@ -109,14 +109,15 @@ export default class InstallBridge extends Component<Props, State> {
|
||||
}
|
||||
|
||||
render() {
|
||||
if (!this.state.target) {
|
||||
const { target } = this.state;
|
||||
if (!target) {
|
||||
return <Loader text="Loading" size={100} />;
|
||||
}
|
||||
|
||||
const changelog = this.props.transport.bridge.changelog.map(entry => (
|
||||
<li key={entry}>{entry}</li>
|
||||
));
|
||||
const url = `${this.state.uri}${this.state.target.value}`;
|
||||
const url = `${this.state.uri}${target.value}`;
|
||||
return (
|
||||
<InstallBridgeWrapper>
|
||||
<TitleHeader>TREZOR Bridge.<BridgeVersion>{this.state.currentVersion}</BridgeVersion></TitleHeader>
|
||||
@ -125,7 +126,7 @@ export default class InstallBridge extends Component<Props, State> {
|
||||
<SelectWrapper
|
||||
isSearchable={false}
|
||||
isClearable={false}
|
||||
value={this.state.target}
|
||||
value={target}
|
||||
onChange={v => this.onChange(v)}
|
||||
options={this.state.installers}
|
||||
/>
|
||||
@ -140,6 +141,17 @@ export default class InstallBridge extends Component<Props, State> {
|
||||
</DownloadBridgeButton>
|
||||
</Link>
|
||||
</DownloadBridgeWrapper>
|
||||
{target.signature && (
|
||||
<P>
|
||||
<Link
|
||||
href={this.state.uri + target.signature}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
isGreen
|
||||
>Check PGP signature
|
||||
</Link>
|
||||
</P>
|
||||
)}
|
||||
<P>
|
||||
{ changelog }
|
||||
<LearnMoreText>Learn more about latest versions in</LearnMoreText>
|
||||
|
Loading…
Reference in New Issue
Block a user