diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java index e6bc895a0..69e1373e1 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java @@ -30,20 +30,18 @@ public class RecoveryKeyResetPasswordController implements FxController { private final RecoveryKeyFactory recoveryKeyFactory; private final ExecutorService executor; private final StringProperty recoveryKey; - private final Lazy recoverScene; private final Lazy recoverResetPasswordSuccessScene; private final FxApplicationWindows appWindows; public NewPasswordController newPasswordController; @Inject - public RecoveryKeyResetPasswordController(@RecoveryKeyWindow Stage window, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, @FxmlScene(FxmlFile.RECOVERYKEY_RECOVER) Lazy recoverScene, @FxmlScene(FxmlFile.RECOVERYKEY_RESET_PASSWORD_SUCCESS) Lazy recoverResetPasswordSuccessScene, FxApplicationWindows appWindows) { + 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) { this.window = window; this.vault = vault; this.recoveryKeyFactory = recoveryKeyFactory; this.executor = executor; this.recoveryKey = recoveryKey; - this.recoverScene = recoverScene; this.recoverResetPasswordSuccessScene = recoverResetPasswordSuccessScene; this.appWindows = appWindows; } @@ -54,7 +52,7 @@ public class RecoveryKeyResetPasswordController implements FxController { } @FXML - public void done() { + public void resetPassword() { Task task = new ResetPasswordTask(); task.setOnScheduled(event -> { LOG.debug("Using recovery key to reset password for {}.", vault.getDisplayablePath()); @@ -65,7 +63,7 @@ public class RecoveryKeyResetPasswordController implements FxController { }); task.setOnFailed(event -> { LOG.error("Resetting password failed.", task.getException()); - appWindows.showErrorWindow(task.getException(), window, recoverScene.get()); + appWindows.showErrorWindow(task.getException(), window, null); }); executor.submit(task); } @@ -86,11 +84,11 @@ public class RecoveryKeyResetPasswordController implements FxController { /* Getter/Setter */ - public ReadOnlyBooleanProperty validPasswordProperty() { + public ReadOnlyBooleanProperty passwordSufficientAndMatchingProperty() { return newPasswordController.goodPasswordProperty(); } - public boolean isValidPassword() { + public boolean isPasswordSufficientAndMatching() { return newPasswordController.isGoodPassword(); } diff --git a/src/main/resources/fxml/recoverykey_reset_password.fxml b/src/main/resources/fxml/recoverykey_reset_password.fxml index 7424e4dd7..79827af35 100644 --- a/src/main/resources/fxml/recoverykey_reset_password.fxml +++ b/src/main/resources/fxml/recoverykey_reset_password.fxml @@ -25,7 +25,7 @@