diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailMissingVaultController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailMissingVaultController.java index dff3c0a4e..7e5998e39 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailMissingVaultController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailMissingVaultController.java @@ -79,11 +79,6 @@ public class VaultDetailMissingVaultController implements FxController { } } - @FXML - void restoreMasterkey() { - recoveryKeyWindow.create(vault.get(), window, new SimpleObjectProperty<>(RecoveryActionType.RESTORE_MASTERKEY)).showRecoveryKeyRecoverWindow(); - } - @FXML public void unlock() { vault.get().stateProperty().set(VaultState.Value.LOCKED); diff --git a/src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java b/src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java index e4b942503..6274224a4 100644 --- a/src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java +++ b/src/main/java/org/cryptomator/ui/mainwindow/VaultListContextMenuController.java @@ -20,9 +20,9 @@ import javafx.stage.Stage; import java.util.EnumSet; import java.util.Objects; +import static org.cryptomator.common.vaults.VaultState.Value.ALL_MISSING; import static org.cryptomator.common.vaults.VaultState.Value.ERROR; import static org.cryptomator.common.vaults.VaultState.Value.LOCKED; -import static org.cryptomator.common.vaults.VaultState.Value.ALL_MISSING; import static org.cryptomator.common.vaults.VaultState.Value.MISSING; import static org.cryptomator.common.vaults.VaultState.Value.NEEDS_MIGRATION; import static org.cryptomator.common.vaults.VaultState.Value.UNLOCKED; diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java index 0042b181e..228a6e2d4 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java @@ -63,12 +63,10 @@ public class RecoveryKeyCreationController implements FxController { public Button nextButton; private final VaultListManager vaultListManager; private final Dialogs dialogs; - private final Stage owner; @Inject public RecoveryKeyCreationController(FxApplicationWindows appWindows, // @RecoveryKeyWindow Stage window, // - @Named("keyRecoveryOwner") Stage owner, // @FxmlScene(FxmlFile.RECOVERYKEY_SUCCESS) Lazy successScene, // @FxmlScene(FxmlFile.RECOVERYKEY_EXPERT_SETTINGS) Lazy recoverykeyExpertSettingsScene, // @RecoveryKeyWindow Vault vault, // @@ -94,7 +92,6 @@ public class RecoveryKeyCreationController implements FxController { this.masterkeyFileAccess = masterkeyFileAccess; this.shorteningThreshold = shorteningThreshold; this.vaultListManager = vaultListManager; - this.owner = owner; this.dialogs = dialogs; } @@ -175,7 +172,6 @@ public class RecoveryKeyCreationController implements FxController { } } - @FXML public void close() { window.close(); diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyOnboardingController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyOnboardingController.java index 3c9017619..c7f560466 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyOnboardingController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyOnboardingController.java @@ -152,4 +152,3 @@ public class RecoveryKeyOnboardingController implements FxController { } } - diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyRecoverController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyRecoverController.java index ae0f84b25..bb8d53ff1 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyRecoverController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyRecoverController.java @@ -13,7 +13,6 @@ import javafx.fxml.FXML; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; -import java.util.Objects; import java.util.ResourceBundle; @RecoveryKeyScoped @@ -33,15 +32,15 @@ public class RecoveryKeyRecoverController implements FxController { @Inject public RecoveryKeyRecoverController(@RecoveryKeyWindow Stage window, // + ResourceBundle resourceBundle, // @FxmlScene(FxmlFile.RECOVERYKEY_RESET_PASSWORD) Lazy resetPasswordScene, // @FxmlScene(FxmlFile.RECOVERYKEY_EXPERT_SETTINGS) Lazy expertSettingsScene, // @FxmlScene(FxmlFile.RECOVERYKEY_ONBOARDING) Lazy onBoardingScene, // - ResourceBundle resourceBundle, // @Named("recoverType") ObjectProperty recoverType) { this.window = window; - this.recoverType = recoverType; - this.onBoardingScene = onBoardingScene; this.resourceBundle = resourceBundle; + this.onBoardingScene = onBoardingScene; + this.recoverType = recoverType; this.nextScene = switch (recoverType.get()) { case RESTORE_ALL, RESTORE_VAULT_CONFIG -> { window.setTitle(resourceBundle.getString("recoveryKey.recoverVaultConfig.title")); @@ -61,7 +60,6 @@ public class RecoveryKeyRecoverController implements FxController { } default -> throw new IllegalArgumentException("Unexpected recovery action type: " + recoverType.get()); }; - } @FXML diff --git a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java index 4cbace436..a876e1930 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java @@ -153,10 +153,12 @@ public class RecoveryKeyResetPasswordController implements FxController { public void resetPassword() { Task task = new ResetPasswordTask(); - task.setOnScheduled(_ -> LOG.debug("Using recovery key to reset password for {}.", vault.getDisplayablePath())); + task.setOnScheduled(_ -> { + LOG.debug("Using recovery key to reset password for {}.", vault.getDisplayablePath()); + }); task.setOnSucceeded(_ -> { - LOG.info("Used recovery key to reset password for {}.", vault.getDisplayablePath()); + LOG.debug("Used recovery key to reset password for {}.", vault.getDisplayablePath()); window.close(); switch (recoverType.get()){ case RESET_PASSWORD -> dialogs.prepareRecoverPasswordSuccess(window).build().showAndWait(); @@ -172,16 +174,6 @@ public class RecoveryKeyResetPasswordController implements FxController { executor.submit(task); } - /* Getter/Setter */ - - public ReadOnlyBooleanProperty passwordSufficientAndMatchingProperty() { - return newPasswordController.goodPasswordProperty(); - } - - public boolean isPasswordSufficientAndMatching() { - return newPasswordController.isGoodPassword(); - } - private class ResetPasswordTask extends Task { private static final Logger LOG = LoggerFactory.getLogger(ResetPasswordTask.class); @@ -196,4 +188,15 @@ public class RecoveryKeyResetPasswordController implements FxController { return null; } } + + /* Getter/Setter */ + + public ReadOnlyBooleanProperty passwordSufficientAndMatchingProperty() { + return newPasswordController.goodPasswordProperty(); + } + + public boolean isPasswordSufficientAndMatching() { + return newPasswordController.isGoodPassword(); + } + } diff --git a/src/main/resources/fxml/addvault_existing.fxml b/src/main/resources/fxml/addvault_existing.fxml index cfbeb2018..200eae4f9 100644 --- a/src/main/resources/fxml/addvault_existing.fxml +++ b/src/main/resources/fxml/addvault_existing.fxml @@ -23,6 +23,7 @@ - diff --git a/src/main/resources/fxml/vault_detail_missing_vault_config.fxml b/src/main/resources/fxml/vault_detail_missing_vault_config.fxml index 8291b5de6..26fa3e096 100644 --- a/src/main/resources/fxml/vault_detail_missing_vault_config.fxml +++ b/src/main/resources/fxml/vault_detail_missing_vault_config.fxml @@ -10,35 +10,33 @@ fx:controller="org.cryptomator.ui.mainwindow.VaultDetailMissingVaultController" alignment="TOP_CENTER" spacing="9"> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/fxml/vault_list.fxml b/src/main/resources/fxml/vault_list.fxml index ab41aa2ef..e21237a43 100644 --- a/src/main/resources/fxml/vault_list.fxml +++ b/src/main/resources/fxml/vault_list.fxml @@ -13,8 +13,6 @@ - -