mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 02:01:27 +00:00
changing test functionality by intended showing now selected file
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package org.cryptomator.ui.addvaultwizard;
|
||||
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.stage.FileChooser;
|
||||
import javafx.stage.Stage;
|
||||
import org.cryptomator.ui.common.FXMLLoaderFactory;
|
||||
@@ -16,6 +18,9 @@ public class ChooseExistingVaultController implements FxController {
|
||||
private final FXMLLoaderFactory fxmlLoaders;
|
||||
private final Stage window;
|
||||
|
||||
@FXML
|
||||
public TextField textField;
|
||||
|
||||
@Inject
|
||||
ChooseExistingVaultController(@AddVaultWizard Stage window, @AddVaultWizard FXMLLoaderFactory fxmlLoaders) {
|
||||
this.window = window;
|
||||
@@ -28,7 +33,7 @@ public class ChooseExistingVaultController implements FxController {
|
||||
fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Cryptomator Masterkey", "*.cryptomator"));
|
||||
final File file = fileChooser.showOpenDialog(window);
|
||||
if (file != null) {
|
||||
window.setWidth(100);
|
||||
textField.setText(file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<VBox xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="org.cryptomator.ui.addvaultwizard.ChooseExistingVaultController"
|
||||
@@ -15,6 +16,7 @@
|
||||
</padding>
|
||||
<children>
|
||||
<Label text="Open your existing vault by choosing its masterkey file:"/>
|
||||
<TextField fx:id="textField" text="path/to/masterkey.cryptomator" disable="true"/>
|
||||
<Button text="file picker" onAction="#chooseFile"/>
|
||||
<Button text="Back" onAction="#goBack"/>
|
||||
<Button text="Open" onAction="#confirm"/>
|
||||
|
||||
Reference in New Issue
Block a user