degenerify button description and rename things in resetPasswordController

This commit is contained in:
Armin Schrenk
2022-07-19 16:36:32 +02:00
parent 00e420a248
commit 10b9e75972
3 changed files with 9 additions and 9 deletions

View File

@@ -30,20 +30,18 @@ public class RecoveryKeyResetPasswordController implements FxController {
private final RecoveryKeyFactory recoveryKeyFactory;
private final ExecutorService executor;
private final StringProperty recoveryKey;
private final Lazy<Scene> recoverScene;
private final Lazy<Scene> 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<Scene> recoverScene, @FxmlScene(FxmlFile.RECOVERYKEY_RESET_PASSWORD_SUCCESS) Lazy<Scene> 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<Scene> 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<Void> 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();
}