mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-20 01:26:52 -04:00
fixing bug where unlock dialog is not shown anymore
This commit is contained in:
@@ -91,8 +91,10 @@ public class UnlockController implements FxController {
|
||||
|
||||
Task<Vault> task = vaultService.createUnlockTask(vault, password);
|
||||
passwordField.setDisable(true);
|
||||
savePassword.setDisable(true);
|
||||
task.setOnSucceeded(event -> {
|
||||
passwordField.setDisable(false);
|
||||
savePassword.setDisable(!keychainAccess.isPresent());
|
||||
if (keychainAccess.isPresent() && savePassword.isSelected()) {
|
||||
try {
|
||||
keychainAccess.get().storePassphrase(vault.getId(), password);
|
||||
@@ -106,6 +108,7 @@ public class UnlockController implements FxController {
|
||||
});
|
||||
task.setOnFailed(event -> {
|
||||
passwordField.setDisable(false);
|
||||
savePassword.setDisable(!keychainAccess.isPresent());
|
||||
if (task.getException() instanceof InvalidPassphraseException) {
|
||||
Animations.createShakeWindowAnimation(window).play();
|
||||
passwordField.selectAll();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<VBox spacing="6">
|
||||
<FormattedLabel format="%unlock.passwordPrompt" arg1="${controller.vault.displayableName}" wrapText="true"/>
|
||||
<NiceSecurePasswordField fx:id="passwordField"/>
|
||||
<CheckBox fx:id="savePassword" text="%unlock.savePassword" onAction="#didClickSavePasswordCheckbox" disable="${controller.vault.processing}"/>
|
||||
<CheckBox fx:id="savePassword" text="%unlock.savePassword" onAction="#didClickSavePasswordCheckbox"/>
|
||||
</VBox>
|
||||
|
||||
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
|
||||
|
||||
Reference in New Issue
Block a user