mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 18:21:26 +00:00
#926 replacing boolean by a string for current vault state
This commit is contained in:
@@ -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> 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?import javafx.scene.text.TextFlow?>
|
||||
<VBox xmlns="http://javafx.com/javafx"
|
||||
@@ -14,18 +14,23 @@
|
||||
</padding>
|
||||
<children>
|
||||
<!--TODO: add caption style class -->
|
||||
<Text text="${controller.vault.displayableName}" />
|
||||
<TextFlow><!--TODO: add visibility of the textflows -->
|
||||
<Text text="%vaultDetail.info.storageLocation" />
|
||||
<Text text="${controller.vault.displayableName}"/>
|
||||
<TextFlow visible="${controller.anyVaultSelected}"><!--TODO: add visibility of the textflows -->
|
||||
<Text text="%vaultDetail.info.storageLocation"/>
|
||||
<Text text="""/>
|
||||
<Text text="${controller.vault.displayablePath}"/>
|
||||
<Text text="""/>
|
||||
</TextFlow>
|
||||
<TextFlow>
|
||||
<Text text="%vaultDetail.info.accessLocation" />
|
||||
<TextFlow visible="${controller.anyVaultSelected}">
|
||||
<Text text="%vaultDetail.info.accessLocation"/>
|
||||
<Text text="""/>
|
||||
<Text text="${controller.vault.customMountPath}"/>
|
||||
<Text text="""/>
|
||||
</TextFlow>
|
||||
<TextFlow>
|
||||
<Text text="%vaultDetail.info.currentState" />
|
||||
<Text text="${controller.vault.locked}"/>
|
||||
<TextFlow visible="${controller.anyVaultSelected}">
|
||||
<Text text="%vaultDetail.info.currentState"/>
|
||||
<Text text="LOCKED" visible="${controller.vault.locked}" managed="${controller.vault.locked}"/><!-- hacky but working -->
|
||||
<Text text="UNLOCKED" visible="${controller.vault.unlocked}" managed="${controller.vault.unlocked}"/>
|
||||
</TextFlow>
|
||||
|
||||
<Button text="TODO unlock" onAction="#unlock" visible="${controller.vault.locked}" defaultButton="${controller.vault.locked}"/>
|
||||
|
||||
@@ -65,7 +65,7 @@ main.closeBtn.tooltip=Close
|
||||
main.settingsBtn.tooltip=Settings
|
||||
vaultlist.emptyList.onboardingInstruction=Click here to add a vault
|
||||
## Vault detail
|
||||
vaultDetail.info.storageLocation=Stored at
|
||||
vaultDetail.info.storageLocation=Stored at
|
||||
vaultDetail.info.accessLocation=Accesssible at
|
||||
vaultDetail.info.currentState=Currently
|
||||
|
||||
|
||||
Reference in New Issue
Block a user