diff --git a/main/ui/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailController.java b/main/ui/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailController.java index a993cb9ba..9250f874e 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/mainwindow/VaultDetailController.java @@ -1,5 +1,6 @@ package org.cryptomator.ui.mainwindow; +import javafx.beans.binding.BooleanBinding; import javafx.beans.property.ObjectProperty; import javafx.beans.property.ReadOnlyObjectProperty; import javafx.fxml.FXML; @@ -21,6 +22,7 @@ public class VaultDetailController implements FxController { private static final Logger LOG = LoggerFactory.getLogger(VaultDetailController.class); private final ReadOnlyObjectProperty vault; + private final BooleanBinding anyVaultSelected; private final ExecutorService executor; private final FxApplication application; private final VaultOptionsComponent.Builder vaultOptionsWindow; @@ -33,6 +35,7 @@ public class VaultDetailController implements FxController { this.application = application; this.vaultOptionsWindow = vaultOptionsWindow; this.changePasswordWindow = changePasswordWindow; + this.anyVaultSelected = vault.isNotNull(); } @FXML @@ -74,4 +77,12 @@ public class VaultDetailController implements FxController { return vault.get(); } + public BooleanBinding anyVaultSelectedProperty() { + return anyVaultSelected; + } + + public boolean isAnyVaultSelected() { + return anyVaultSelected.get(); + } + } diff --git a/main/ui/src/main/resources/fxml/vault_detail.fxml b/main/ui/src/main/resources/fxml/vault_detail.fxml index f18ed06be..7c0e54d5a 100644 --- a/main/ui/src/main/resources/fxml/vault_detail.fxml +++ b/main/ui/src/main/resources/fxml/vault_detail.fxml @@ -1,8 +1,8 @@ - + - - - + + + + + - - + + + + - - - + + + +