mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 02:01:27 +00: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);
|
Task<Vault> task = vaultService.createUnlockTask(vault, password);
|
||||||
passwordField.setDisable(true);
|
passwordField.setDisable(true);
|
||||||
|
savePassword.setDisable(true);
|
||||||
task.setOnSucceeded(event -> {
|
task.setOnSucceeded(event -> {
|
||||||
passwordField.setDisable(false);
|
passwordField.setDisable(false);
|
||||||
|
savePassword.setDisable(!keychainAccess.isPresent());
|
||||||
if (keychainAccess.isPresent() && savePassword.isSelected()) {
|
if (keychainAccess.isPresent() && savePassword.isSelected()) {
|
||||||
try {
|
try {
|
||||||
keychainAccess.get().storePassphrase(vault.getId(), password);
|
keychainAccess.get().storePassphrase(vault.getId(), password);
|
||||||
@@ -106,6 +108,7 @@ public class UnlockController implements FxController {
|
|||||||
});
|
});
|
||||||
task.setOnFailed(event -> {
|
task.setOnFailed(event -> {
|
||||||
passwordField.setDisable(false);
|
passwordField.setDisable(false);
|
||||||
|
savePassword.setDisable(!keychainAccess.isPresent());
|
||||||
if (task.getException() instanceof InvalidPassphraseException) {
|
if (task.getException() instanceof InvalidPassphraseException) {
|
||||||
Animations.createShakeWindowAnimation(window).play();
|
Animations.createShakeWindowAnimation(window).play();
|
||||||
passwordField.selectAll();
|
passwordField.selectAll();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<VBox spacing="6">
|
<VBox spacing="6">
|
||||||
<FormattedLabel format="%unlock.passwordPrompt" arg1="${controller.vault.displayableName}" wrapText="true"/>
|
<FormattedLabel format="%unlock.passwordPrompt" arg1="${controller.vault.displayableName}" wrapText="true"/>
|
||||||
<NiceSecurePasswordField fx:id="passwordField"/>
|
<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>
|
||||||
|
|
||||||
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
|
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
|
||||||
|
|||||||
Reference in New Issue
Block a user