fix configure later path

This commit is contained in:
Craig Raw 2021-02-24 11:11:31 +02:00
parent 16da6ae224
commit bb8c9a19cf
3 changed files with 8 additions and 1 deletions

View file

@ -231,6 +231,7 @@ public class AppController implements Initializable {
setServerType(Config.get().getServerType());
serverToggle.setSelected(isConnected());
serverToggle.setDisable(Config.get().getServerType() == null);
onlineProperty().bindBidirectional(serverToggle.selectedProperty());
onlineProperty().addListener((observable, oldValue, newValue) -> {
Platform.runLater(() -> setServerToggleTooltip(getCurrentBlockHeight()));
@ -1095,6 +1096,8 @@ public class AppController implements Initializable {
} else {
serverToggle.getStyleClass().remove("core-server");
}
serverToggle.setDisable(false);
}
public void setTheme(ActionEvent event) {

View file

@ -10,6 +10,7 @@ import com.sparrowwallet.sparrow.io.FileType;
import com.sparrowwallet.sparrow.io.IOUtils;
import com.sparrowwallet.sparrow.io.Storage;
import com.sparrowwallet.sparrow.net.Bwt;
import com.sparrowwallet.sparrow.net.PublicElectrumServer;
import com.sparrowwallet.sparrow.net.ServerType;
import com.sparrowwallet.sparrow.preferences.PreferenceGroup;
import com.sparrowwallet.sparrow.preferences.PreferencesDialog;
@ -62,6 +63,9 @@ public class MainApp extends Application {
PreferencesDialog preferencesDialog = new PreferencesDialog(PreferenceGroup.SERVER, true);
Optional<Boolean> optNewWallet = preferencesDialog.showAndWait();
createNewWallet = optNewWallet.isPresent() && optNewWallet.get();
} else if(Network.get() == Network.MAINNET) {
Config.get().setServerType(ServerType.PUBLIC_ELECTRUM_SERVER);
Config.get().setPublicElectrumServer(PublicElectrumServer.values()[new Random().nextInt(PublicElectrumServer.values().length)].getUrl());
}
}
}

View file

@ -31,7 +31,7 @@
</Label>
<Label text="Sparrow is a Bitcoin wallet with a focus on security and usability." wrapText="true" styleClass="content-text" />
<Label text="Sparrow can operate in both an online and offline mode. In the online mode it connects to a server to display transaction history. In the offline mode it is useful as a transaction editor and as an airgapped multisig coordinator." wrapText="true" styleClass="content-text" />
<Label text="The status bar at the bottom displays the current connection status:" wrapText="true" styleClass="content-text" />
<Label text="The status bar at the bottom displays the connection status, as demonstrated below:" wrapText="true" styleClass="content-text" />
</VBox>
<VBox fx:id="step2" spacing="15">
<Label text="Connecting to a Public Server" styleClass="title-text">