mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-25 15:20:40 -04:00
Give visual feedback (tor icon) when bootstrap is complete
This commit is contained in:
parent
c68c06d598
commit
e90dc52f36
2 changed files with 8 additions and 1 deletions
|
@ -394,6 +394,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
ImageView p2PNetworkIcon = new ImageView();
|
ImageView p2PNetworkIcon = new ImageView();
|
||||||
setRightAnchor(p2PNetworkIcon, 10d);
|
setRightAnchor(p2PNetworkIcon, 10d);
|
||||||
setBottomAnchor(p2PNetworkIcon, 7d);
|
setBottomAnchor(p2PNetworkIcon, 7d);
|
||||||
|
p2PNetworkIcon.setOpacity(0.4);
|
||||||
p2PNetworkIcon.idProperty().bind(model.p2PNetworkIconId);
|
p2PNetworkIcon.idProperty().bind(model.p2PNetworkIconId);
|
||||||
p2PNetworkLabel.idProperty().bind(model.p2PNetworkLabelId);
|
p2PNetworkLabel.idProperty().bind(model.p2PNetworkLabelId);
|
||||||
model.p2PNetworkWarnMsg.addListener((ov, oldValue, newValue) -> {
|
model.p2PNetworkWarnMsg.addListener((ov, oldValue, newValue) -> {
|
||||||
|
@ -404,6 +405,10 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
model.bootstrapComplete.addListener((observable, oldValue, newValue) -> {
|
||||||
|
p2PNetworkIcon.setOpacity(1);
|
||||||
|
});
|
||||||
|
|
||||||
AnchorPane footerContainer = new AnchorPane(separator, blockchainSyncBox, versionLabel, p2PNetworkLabel, p2PNetworkIcon) {{
|
AnchorPane footerContainer = new AnchorPane(separator, blockchainSyncBox, versionLabel, p2PNetworkLabel, p2PNetworkIcon) {{
|
||||||
setId("footer-pane");
|
setId("footer-pane");
|
||||||
setMinHeight(30);
|
setMinHeight(30);
|
||||||
|
|
|
@ -99,7 +99,8 @@ public class MainViewModel implements ViewModel {
|
||||||
final DoubleProperty splashP2PNetworkProgress = new SimpleDoubleProperty(-1);
|
final DoubleProperty splashP2PNetworkProgress = new SimpleDoubleProperty(-1);
|
||||||
final StringProperty p2PNetworkWarnMsg = new SimpleStringProperty();
|
final StringProperty p2PNetworkWarnMsg = new SimpleStringProperty();
|
||||||
final StringProperty p2PNetworkIconId = new SimpleStringProperty();
|
final StringProperty p2PNetworkIconId = new SimpleStringProperty();
|
||||||
|
final BooleanProperty bootstrapComplete = new SimpleBooleanProperty();
|
||||||
|
|
||||||
// software update
|
// software update
|
||||||
final String version = "v." + Version.VERSION;
|
final String version = "v." + Version.VERSION;
|
||||||
|
|
||||||
|
@ -242,6 +243,7 @@ public class MainViewModel implements ViewModel {
|
||||||
public void onBootstrapComplete() {
|
public void onBootstrapComplete() {
|
||||||
updateP2pNetworkInfoWithPeersChanged(p2PService.getNumConnectedPeers().get());
|
updateP2pNetworkInfoWithPeersChanged(p2PService.getNumConnectedPeers().get());
|
||||||
splashP2PNetworkProgress.set(1);
|
splashP2PNetworkProgress.set(1);
|
||||||
|
bootstrapComplete.set(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue