mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-17 10:11:27 +00:00
add suffix to to create new vault workflow since there will be more than one step
This commit is contained in:
@@ -74,10 +74,10 @@ public abstract class AddVaultModule {
|
||||
}
|
||||
|
||||
@Provides
|
||||
@FxmlScene(FxmlFile.ADDVAULT_NEW)
|
||||
@FxmlScene(FxmlFile.ADDVAULT_NEW_NAME)
|
||||
@AddVaultWizardScoped
|
||||
static Scene provideCreateNewVaultScene(@AddVaultWizard FXMLLoaderFactory fxmlLoaders) {
|
||||
return fxmlLoaders.createScene("/fxml/addvault_new.fxml");
|
||||
return fxmlLoaders.createScene("/fxml/addvault_new_name.fxml");
|
||||
|
||||
}
|
||||
// ------------------
|
||||
@@ -94,8 +94,8 @@ public abstract class AddVaultModule {
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FxControllerKey(CreateNewVaultController.class)
|
||||
abstract FxController bindCreateNewVaultController(CreateNewVaultController controller);
|
||||
@FxControllerKey(CreateNewVaultNameController.class)
|
||||
abstract FxController bindCreateNewVaultNameController(CreateNewVaultNameController controller);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class AddVaultWelcomeController implements FxController {
|
||||
private final Lazy<Scene> createNewVaultScene;
|
||||
|
||||
@Inject
|
||||
AddVaultWelcomeController(@AddVaultWizard Stage window, @FxmlScene(FxmlFile.ADDVAULT_EXISTING) Lazy<Scene> chooseExistingVaultScene, @FxmlScene(FxmlFile.ADDVAULT_NEW) Lazy<Scene> createNewVaultScene) {
|
||||
AddVaultWelcomeController(@AddVaultWizard Stage window, @FxmlScene(FxmlFile.ADDVAULT_EXISTING) Lazy<Scene> chooseExistingVaultScene, @FxmlScene(FxmlFile.ADDVAULT_NEW_NAME) Lazy<Scene> createNewVaultScene) {
|
||||
this.window = window;
|
||||
this.chooseExistingVaultScene = chooseExistingVaultScene;
|
||||
this.createNewVaultScene = createNewVaultScene;
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.ResourceBundle;
|
||||
* TODO: Add trim() filter to vaultName
|
||||
*/
|
||||
@AddVaultWizardScoped
|
||||
public class CreateNewVaultController implements FxController {
|
||||
public class CreateNewVaultNameController implements FxController {
|
||||
|
||||
public TextField textField;
|
||||
private final Stage window;
|
||||
@@ -30,7 +30,7 @@ public class CreateNewVaultController implements FxController {
|
||||
private final ResourceBundle resourceBundle;
|
||||
|
||||
@Inject
|
||||
CreateNewVaultController(@AddVaultWizard Stage window, @FxmlScene(FxmlFile.ADDVAULT_WELCOME) Lazy<Scene> welcomeScene, StringProperty vaultName, ResourceBundle resourceBundle) {
|
||||
CreateNewVaultNameController(@AddVaultWizard Stage window, @FxmlScene(FxmlFile.ADDVAULT_WELCOME) Lazy<Scene> welcomeScene, StringProperty vaultName, ResourceBundle resourceBundle) {
|
||||
this.window = window;
|
||||
this.welcomeScene = welcomeScene;
|
||||
this.vaultName = vaultName;
|
||||
@@ -57,7 +57,7 @@ public class CreateNewVaultController implements FxController {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if {@link CreateNewVaultController#vaultName}is a valid directory name in the OS by creating and deleting a directory with the giving name in the temporary section of the OS
|
||||
* Checks if {@link CreateNewVaultNameController#vaultName}is a valid directory name in the OS by creating and deleting a directory with the giving name in the temporary section of the OS
|
||||
* TODO: Logging
|
||||
*
|
||||
* @return true, if a directory with the name already exists or can be created
|
||||
@@ -4,7 +4,7 @@ public enum FxmlFile {
|
||||
MAIN_WINDOW("/fxml/main_window.fxml"), //
|
||||
ADDVAULT_WELCOME("/fxml/addvault_welcome.fxml"), //
|
||||
ADDVAULT_EXISTING("/fxml/addvault_existing.fxml"), //
|
||||
ADDVAULT_NEW("/fxml/addvault_new.fxml"), //
|
||||
ADDVAULT_NEW_NAME("/fxml/addvault_new_name.fxml"), //
|
||||
PREFERENCES("/fxml/preferences.fxml"), //
|
||||
UNLOCK("/fxml/unlock2.fxml"), // TODO rename
|
||||
UNLOCK_SUCCESS("/fxml/unlock_success.fxml"),
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<VBox xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="org.cryptomator.ui.addvaultwizard.CreateNewVaultController"
|
||||
fx:controller="org.cryptomator.ui.addvaultwizard.CreateNewVaultNameController"
|
||||
prefHeight="400.0" prefWidth="600.0"
|
||||
alignment="CENTER">
|
||||
<padding>
|
||||
Reference in New Issue
Block a user