diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index b7bd661d..605b42fa 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -24,6 +24,7 @@ import com.sparrowwallet.sparrow.event.*; import com.sparrowwallet.sparrow.io.*; import com.sparrowwallet.sparrow.net.ElectrumServer; import com.sparrowwallet.sparrow.net.ServerType; +import com.sparrowwallet.sparrow.preferences.PreferenceGroup; import com.sparrowwallet.sparrow.preferences.PreferencesDialog; import com.sparrowwallet.sparrow.transaction.TransactionController; import com.sparrowwallet.sparrow.transaction.TransactionData; @@ -260,6 +261,15 @@ public class AppController implements Initializable { } } + public void showIntroduction(ActionEvent event) { + WelcomeDialog welcomeDialog = new WelcomeDialog(); + Optional optionalMode = welcomeDialog.showAndWait(); + if(optionalMode.isPresent() && optionalMode.get().equals(Mode.ONLINE)) { + PreferencesDialog preferencesDialog = new PreferencesDialog(PreferenceGroup.SERVER); + preferencesDialog.showAndWait(); + } + } + public void showAbout(ActionEvent event) { Stage aboutStage = getAboutStage(); aboutStage.show(); diff --git a/src/main/java/com/sparrowwallet/sparrow/WelcomeDialog.java b/src/main/java/com/sparrowwallet/sparrow/WelcomeDialog.java index c64321bf..3fdf8c48 100644 --- a/src/main/java/com/sparrowwallet/sparrow/WelcomeDialog.java +++ b/src/main/java/com/sparrowwallet/sparrow/WelcomeDialog.java @@ -27,7 +27,7 @@ public class WelcomeDialog extends Dialog { final ButtonType nextButtonType = new javafx.scene.control.ButtonType("Next", ButtonBar.ButtonData.OK_DONE); final ButtonType backButtonType = new javafx.scene.control.ButtonType("Back", ButtonBar.ButtonData.LEFT); final ButtonType onlineButtonType = new javafx.scene.control.ButtonType("Configure Server", ButtonBar.ButtonData.APPLY); - final ButtonType offlineButtonType = new javafx.scene.control.ButtonType("Later or Offline Mode", ButtonBar.ButtonData.CANCEL_CLOSE); + final ButtonType offlineButtonType = new javafx.scene.control.ButtonType(AppServices.isConnected() ? "Done" : "Later or Offline Mode", ButtonBar.ButtonData.CANCEL_CLOSE); dialogPane.getButtonTypes().addAll(nextButtonType, backButtonType, onlineButtonType, offlineButtonType); Button nextButton = (Button)dialogPane.lookupButton(nextButtonType); diff --git a/src/main/resources/com/sparrowwallet/sparrow/app.fxml b/src/main/resources/com/sparrowwallet/sparrow/app.fxml index 7e1b8a5d..71314413 100644 --- a/src/main/resources/com/sparrowwallet/sparrow/app.fxml +++ b/src/main/resources/com/sparrowwallet/sparrow/app.fxml @@ -90,6 +90,7 @@ +