diff --git a/src/main/java/org/cryptomator/ui/common/FxmlFile.java b/src/main/java/org/cryptomator/ui/common/FxmlFile.java index 6c5068684..13c0d4609 100644 --- a/src/main/java/org/cryptomator/ui/common/FxmlFile.java +++ b/src/main/java/org/cryptomator/ui/common/FxmlFile.java @@ -44,6 +44,7 @@ public enum FxmlFile { RECOVERYKEY_RECOVER("/fxml/recoverykey_recover.fxml"), // RECOVERYKEY_RESET_PASSWORD("/fxml/recoverykey_reset_password.fxml"), // RECOVERYKEY_RESET_PASSWORD_SUCCESS("/fxml/recoverykey_reset_password_success.fxml"), // + RECOVERYKEY_RESET_VAULT_CONFIG_SUCCESS("/fxml/recoverykey_reset_vault_config_success.fxml"), // RECOVERYKEY_SUCCESS("/fxml/recoverykey_success.fxml"), // REMOVE_CERT("/fxml/remove_cert.fxml"), // REMOVE_VAULT("/fxml/remove_vault.fxml"), // diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyModule.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyModule.java index 06095eebc..03b1bc029 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyModule.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyModule.java @@ -105,6 +105,13 @@ abstract class RecoveryKeyModule { return fxmlLoaders.createScene(FxmlFile.RECOVERYKEY_RESET_PASSWORD_SUCCESS); } + @Provides + @FxmlScene(FxmlFile.RECOVERYKEY_RESET_VAULT_CONFIG_SUCCESS) + @RecoveryKeyScoped + static Scene provideRecoveryKeyResetVaultConfigSuccessScene(@RecoveryKeyWindow FxmlLoaderFactory fxmlLoaders) { + return fxmlLoaders.createScene(FxmlFile.RECOVERYKEY_RESET_VAULT_CONFIG_SUCCESS); + } + // ------------------ diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java index b3299ca66..c5b466430 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java @@ -47,19 +47,29 @@ public class RecoveryKeyResetPasswordController implements FxController { private final ExecutorService executor; private final StringProperty recoveryKey; private final Lazy recoverResetPasswordSuccessScene; + private final Lazy recoverResetVaultConfigSuccessScene; private final FxApplicationWindows appWindows; private final MasterkeyFileAccess masterkeyFileAccess; public NewPasswordController newPasswordController; @Inject - public RecoveryKeyResetPasswordController(@RecoveryKeyWindow Stage window, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, @FxmlScene(FxmlFile.RECOVERYKEY_RESET_PASSWORD_SUCCESS) Lazy recoverResetPasswordSuccessScene, FxApplicationWindows appWindows, MasterkeyFileAccess masterkeyFileAccess) { + public RecoveryKeyResetPasswordController(@RecoveryKeyWindow Stage window, // + @RecoveryKeyWindow Vault vault, // + RecoveryKeyFactory recoveryKeyFactory, // + ExecutorService executor, // + @RecoveryKeyWindow StringProperty recoveryKey, // + @FxmlScene(FxmlFile.RECOVERYKEY_RESET_PASSWORD_SUCCESS) Lazy recoverResetPasswordSuccessScene, // + @FxmlScene(FxmlFile.RECOVERYKEY_RESET_VAULT_CONFIG_SUCCESS) Lazy recoverResetVaultConfigSuccessScene, // + FxApplicationWindows appWindows, // + MasterkeyFileAccess masterkeyFileAccess) { this.window = window; this.vault = vault; this.recoveryKeyFactory = recoveryKeyFactory; this.executor = executor; this.recoveryKey = recoveryKey; this.recoverResetPasswordSuccessScene = recoverResetPasswordSuccessScene; + this.recoverResetVaultConfigSuccessScene = recoverResetVaultConfigSuccessScene; this.appWindows = appWindows; this.masterkeyFileAccess = masterkeyFileAccess; } @@ -105,7 +115,7 @@ public class RecoveryKeyResetPasswordController implements FxController { } }); } - window.setScene(recoverResetPasswordSuccessScene.get()); + window.setScene(recoverResetVaultConfigSuccessScene.get()); } catch (IOException e) { LOG.error("Moving recovered files failed", e); } diff --git a/src/main/resources/fxml/recoverykey_reset_vault_config_success.fxml b/src/main/resources/fxml/recoverykey_reset_vault_config_success.fxml new file mode 100644 index 000000000..196617483 --- /dev/null +++ b/src/main/resources/fxml/recoverykey_reset_vault_config_success.fxml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +