improve first run feedback
This commit is contained in:
parent
f226b19b65
commit
1f588ff923
1 changed files with 14 additions and 4 deletions
|
@ -30,6 +30,7 @@ export class SplashScreen extends React.PureComponent {
|
|||
|
||||
_updateStatusCallback(status) {
|
||||
const startupStatus = status.startup_status;
|
||||
console.log(status);
|
||||
if (startupStatus.code == "started") {
|
||||
// Wait until we are able to resolve a name before declaring
|
||||
// that we are done.
|
||||
|
@ -52,10 +53,19 @@ export class SplashScreen extends React.PureComponent {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if (status.blockchain_status && status.blockchain_status.blocks_behind > 0) {
|
||||
this.setState({
|
||||
message: __("Blockchain Sync"),
|
||||
details: __("%s blocks behind", status.blockchain_status.blocks_behind),
|
||||
isLagging: startupStatus.is_lagging,
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
message: __("Network Loading"),
|
||||
details: startupStatus.message + (startupStatus.is_lagging ? "" : "..."),
|
||||
isLagging: startupStatus.is_lagging,
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.updateStatus();
|
||||
}, 500);
|
||||
|
|
Loading…
Reference in a new issue