1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

added changelog to InstallBridge + render "cancel" conditionally

This commit is contained in:
Szymon Lesisz 2018-10-05 09:24:36 +02:00
parent 3512c271e2
commit 6addcb6cde
2 changed files with 18 additions and 11 deletions

View File

@ -13,7 +13,7 @@ export type LatestBridge = {
version: Array<number>;
directory: string;
packages: Array<{ name: string; url: string; signature?: string; preferred: boolean; }>;
changelog: string;
changelog: Array<string>;
}
export type State = {
@ -48,7 +48,7 @@ const initialState: State = {
version: [],
directory: '',
packages: [],
changelog: '',
changelog: [],
},
},
browserState: {},

View File

@ -115,6 +115,10 @@ export default class InstallBridge extends Component<Props, State> {
if (!this.state.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}`;
return (
<InstallBridgeWrapper>
@ -140,7 +144,8 @@ export default class InstallBridge extends Component<Props, State> {
</Link>
</DownloadBridgeWrapper>
<P>
<LearnMoreText>Learn more about latest version in</LearnMoreText>
{ changelog }
<LearnMoreText>Learn more about latest versions in</LearnMoreText>
<Link
href="https://github.com/trezor/trezord-go/blob/master/CHANGELOG.md"
target="_blank"
@ -149,14 +154,16 @@ export default class InstallBridge extends Component<Props, State> {
>Changelog
</Link>
</P>
<P>
No, i dont want to upgrade Bridge now,
</P>
<P>
Take me <Link href="#/">back to the wallet</Link>
</P>
{this.props.transport.type && (
<React.Fragment>
<P>
No, i dont want to upgrade Bridge now,
</P>
<P>
Take me <Link href="#/">back to the wallet</Link>
</P>
</React.Fragment>
)}
</InstallBridgeWrapper>
);
}