|
@@ -3,6 +3,7 @@ package org.cryptomator.ui.vaultoptions;
|
|
|
import org.cryptomator.common.settings.WhenUnlocked;
|
|
|
import org.cryptomator.common.vaults.Vault;
|
|
|
import org.cryptomator.ui.common.FxController;
|
|
|
+import org.cryptomator.ui.health.HealthCheckComponent;
|
|
|
|
|
|
import javax.inject.Inject;
|
|
|
import javafx.beans.Observable;
|
|
@@ -22,6 +23,7 @@ public class GeneralVaultOptionsController implements FxController {
|
|
|
|
|
|
private final Stage window;
|
|
|
private final Vault vault;
|
|
|
+ private final HealthCheckComponent.Builder healthCheckWindow;
|
|
|
private final ResourceBundle resourceBundle;
|
|
|
|
|
|
public TextField vaultName;
|
|
@@ -29,9 +31,10 @@ public class GeneralVaultOptionsController implements FxController {
|
|
|
public ChoiceBox<WhenUnlocked> actionAfterUnlockChoiceBox;
|
|
|
|
|
|
@Inject
|
|
|
- GeneralVaultOptionsController(@VaultOptionsWindow Stage window, @VaultOptionsWindow Vault vault, ResourceBundle resourceBundle) {
|
|
|
+ GeneralVaultOptionsController(@VaultOptionsWindow Stage window, @VaultOptionsWindow Vault vault, HealthCheckComponent.Builder healthCheckWindow, ResourceBundle resourceBundle) {
|
|
|
this.window = window;
|
|
|
this.vault = vault;
|
|
|
+ this.healthCheckWindow = healthCheckWindow;
|
|
|
this.resourceBundle = resourceBundle;
|
|
|
}
|
|
|
|
|
@@ -61,6 +64,12 @@ public class GeneralVaultOptionsController implements FxController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @FXML
|
|
|
+ public void showHealthCheck() {
|
|
|
+ healthCheckWindow.vault(vault).build().showHealthCheckWindow();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private static class WhenUnlockedConverter extends StringConverter<WhenUnlocked> {
|
|
|
|
|
|
private final ResourceBundle resourceBundle;
|