|
@@ -1,11 +1,13 @@
|
|
package org.cryptomator.ui.keyloading.masterkeyfile;
|
|
package org.cryptomator.ui.keyloading.masterkeyfile;
|
|
|
|
|
|
|
|
+import org.cryptomator.common.vaults.Vault;
|
|
import org.cryptomator.ui.common.FxController;
|
|
import org.cryptomator.ui.common.FxController;
|
|
import org.cryptomator.ui.keyloading.KeyLoading;
|
|
import org.cryptomator.ui.keyloading.KeyLoading;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
import javax.inject.Inject;
|
|
import javax.inject.Inject;
|
|
|
|
+import javafx.beans.binding.StringBinding;
|
|
import javafx.fxml.FXML;
|
|
import javafx.fxml.FXML;
|
|
import javafx.stage.FileChooser;
|
|
import javafx.stage.FileChooser;
|
|
import javafx.stage.Stage;
|
|
import javafx.stage.Stage;
|
|
@@ -23,12 +25,14 @@ public class ChooseMasterkeyFileController implements FxController {
|
|
private static final Logger LOG = LoggerFactory.getLogger(ChooseMasterkeyFileController.class);
|
|
private static final Logger LOG = LoggerFactory.getLogger(ChooseMasterkeyFileController.class);
|
|
|
|
|
|
private final Stage window;
|
|
private final Stage window;
|
|
|
|
+ private final Vault vault;
|
|
private final CompletableFuture<Path> result;
|
|
private final CompletableFuture<Path> result;
|
|
private final ResourceBundle resourceBundle;
|
|
private final ResourceBundle resourceBundle;
|
|
|
|
|
|
@Inject
|
|
@Inject
|
|
- public ChooseMasterkeyFileController(@KeyLoading Stage window, CompletableFuture<Path> result, ResourceBundle resourceBundle) {
|
|
|
|
|
|
+ public ChooseMasterkeyFileController(@KeyLoading Stage window, @KeyLoading Vault vault, CompletableFuture<Path> result, ResourceBundle resourceBundle) {
|
|
this.window = window;
|
|
this.window = window;
|
|
|
|
+ this.vault = vault;
|
|
this.result = result;
|
|
this.result = result;
|
|
this.resourceBundle = resourceBundle;
|
|
this.resourceBundle = resourceBundle;
|
|
this.window.setOnHiding(this::windowClosed);
|
|
this.window.setOnHiding(this::windowClosed);
|
|
@@ -56,4 +60,10 @@ public class ChooseMasterkeyFileController implements FxController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //--- Setter & Getter ---
|
|
|
|
+
|
|
|
|
+ public String getDisplayName(){
|
|
|
|
+ return vault.getDisplayName();
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|