mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-14 08:41:28 +00:00
degenerify button description and rename things in resetPasswordController
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<ButtonBar buttonMinWidth="120" buttonOrder="+CI">
|
||||
<buttons>
|
||||
<Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#close"/>
|
||||
<Button text="%generic.button.reset" ButtonBar.buttonData="FINISH" defaultButton="true" onAction="#done" disable="${!controller.validPassword}"/>
|
||||
<Button text="%recoveryKey.recover.resetBtn" ButtonBar.buttonData="FINISH" defaultButton="true" onAction="#resetPassword" disable="${!controller.passwordSufficientAndMatching}"/>
|
||||
</buttons>
|
||||
</ButtonBar>
|
||||
</VBox>
|
||||
|
||||
@@ -14,7 +14,6 @@ generic.button.copied=Copied!
|
||||
generic.button.done=Done
|
||||
generic.button.next=Next
|
||||
generic.button.print=Print
|
||||
generic.button.reset=Reset
|
||||
|
||||
# Error
|
||||
error.message=An error occurred
|
||||
@@ -377,10 +376,13 @@ recoveryKey.create.description=Enter the password for "%s" to show its recovery
|
||||
recoveryKey.display.description=The following recovery key can be used to restore access to "%s":
|
||||
recoveryKey.display.StorageHints=Keep it somewhere very secure, e.g.:\n • Store it using a password manager\n • Save it on a USB flash drive\n • Print it on paper
|
||||
## Reset Password
|
||||
### Enter Recovery Key
|
||||
recoveryKey.recover.title=Reset Password
|
||||
recoveryKey.recover.prompt=Enter your recovery key for "%s":
|
||||
recoveryKey.recover.validKey=This is a valid recovery key
|
||||
recoveryKey.printout.heading=Cryptomator Recovery Key\n"%s"\n
|
||||
### Reset Password
|
||||
recoveryKey.recover.resetBtn=Reset
|
||||
### Recovery Key Password Reset Success
|
||||
recoveryKey.recover.resetSuccess.message=Password reset successful
|
||||
recoveryKey.recover.resetSuccess.description=You can unlock your vault with the new password.
|
||||
|
||||
Reference in New Issue
Block a user