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:
parent
3512c271e2
commit
6addcb6cde
@ -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: {},
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user