From 4f4346364950467fcfbfdbfe30adab617d25f8b9 Mon Sep 17 00:00:00 2001 From: JaniruTEC Date: Sun, 11 Apr 2021 02:17:49 +0200 Subject: [PATCH] Renamed files/constants used by the generic error report --- .../ui/addvaultwizard/ChooseExistingVaultController.java | 6 +++--- .../addvaultwizard/CreateNewVaultLocationController.java | 6 +++--- .../addvaultwizard/CreateNewVaultPasswordController.java | 6 +++--- .../ui/changepassword/ChangePasswordController.java | 7 +++---- .../src/main/java/org/cryptomator/ui/common/FxmlFile.java | 2 +- .../main/java/org/cryptomator/ui/error/ErrorModule.java | 8 ++++---- .../{ErrorComponent.java => GenericErrorComponent.java} | 6 +++--- .../{ErrorController.java => GenericErrorController.java} | 4 ++-- .../org/cryptomator/ui/fxapp/FxApplicationModule.java | 4 ++-- .../cryptomator/ui/migration/MigrationRunController.java | 6 +++--- .../ui/preferences/GeneralPreferencesController.java | 6 +++--- .../ui/recoverykey/RecoveryKeyCreationController.java | 6 +++--- .../recoverykey/RecoveryKeyResetPasswordController.java | 6 +++--- .../java/org/cryptomator/ui/unlock/UnlockWorkflow.java | 6 +++--- .../resources/fxml/{error.fxml => generic_error.fxml} | 2 +- 15 files changed, 40 insertions(+), 41 deletions(-) rename main/ui/src/main/java/org/cryptomator/ui/error/{ErrorComponent.java => GenericErrorComponent.java} (88%) rename main/ui/src/main/java/org/cryptomator/ui/error/{ErrorController.java => GenericErrorController.java} (81%) rename main/ui/src/main/resources/fxml/{error.fxml => generic_error.fxml} (95%) diff --git a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/ChooseExistingVaultController.java b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/ChooseExistingVaultController.java index 504136f4a..fc7a7b70c 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/ChooseExistingVaultController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/ChooseExistingVaultController.java @@ -4,7 +4,7 @@ import dagger.Lazy; import org.apache.commons.lang3.SystemUtils; import org.cryptomator.common.vaults.Vault; import org.cryptomator.common.vaults.VaultListManager; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; @@ -34,7 +34,7 @@ public class ChooseExistingVaultController implements FxController { private final Stage window; private final Lazy welcomeScene; private final Lazy successScene; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; private final ObjectProperty vaultPath; private final ObjectProperty vault; private final VaultListManager vaultListManager; @@ -43,7 +43,7 @@ public class ChooseExistingVaultController implements FxController { private Image screenshot; @Inject - ChooseExistingVaultController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_WELCOME) Lazy welcomeScene, @FxmlScene(FxmlFile.ADDVAULT_SUCCESS) Lazy successScene, ErrorComponent.Builder errorComponent, ObjectProperty vaultPath, @AddVaultWizardWindow ObjectProperty vault, VaultListManager vaultListManager, ResourceBundle resourceBundle) { + ChooseExistingVaultController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_WELCOME) Lazy welcomeScene, @FxmlScene(FxmlFile.ADDVAULT_SUCCESS) Lazy successScene, GenericErrorComponent.Builder errorComponent, ObjectProperty vaultPath, @AddVaultWizardWindow ObjectProperty vault, VaultListManager vaultListManager, ResourceBundle resourceBundle) { this.window = window; this.welcomeScene = welcomeScene; this.successScene = successScene; diff --git a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java index 9da33eaad..684e3d9d1 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultLocationController.java @@ -1,7 +1,7 @@ package org.cryptomator.ui.addvaultwizard; import dagger.Lazy; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; @@ -43,7 +43,7 @@ public class CreateNewVaultLocationController implements FxController { private final Stage window; private final Lazy chooseNameScene; private final Lazy choosePasswordScene; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; private final LocationPresets locationPresets; private final ObjectProperty vaultPath; private final StringProperty vaultName; @@ -61,7 +61,7 @@ public class CreateNewVaultLocationController implements FxController { public RadioButton customRadioButton; @Inject - CreateNewVaultLocationController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_NEW_NAME) Lazy chooseNameScene, @FxmlScene(FxmlFile.ADDVAULT_NEW_PASSWORD) Lazy choosePasswordScene, ErrorComponent.Builder errorComponent, LocationPresets locationPresets, ObjectProperty vaultPath, @Named("vaultName") StringProperty vaultName, ResourceBundle resourceBundle) { + CreateNewVaultLocationController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_NEW_NAME) Lazy chooseNameScene, @FxmlScene(FxmlFile.ADDVAULT_NEW_PASSWORD) Lazy choosePasswordScene, GenericErrorComponent.Builder errorComponent, LocationPresets locationPresets, ObjectProperty vaultPath, @Named("vaultName") StringProperty vaultName, ResourceBundle resourceBundle) { this.window = window; this.chooseNameScene = chooseNameScene; this.choosePasswordScene = choosePasswordScene; diff --git a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java index cf0c68040..aa76a5596 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/addvaultwizard/CreateNewVaultPasswordController.java @@ -5,7 +5,7 @@ import org.cryptomator.common.vaults.Vault; import org.cryptomator.common.vaults.VaultListManager; import org.cryptomator.cryptofs.CryptoFileSystemProperties; import org.cryptomator.cryptofs.CryptoFileSystemProvider; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; @@ -53,7 +53,7 @@ public class CreateNewVaultPasswordController implements FxController { private final Lazy chooseLocationScene; private final Lazy recoveryKeyScene; private final Lazy successScene; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; private final ExecutorService executor; private final RecoveryKeyFactory recoveryKeyFactory; private final StringProperty vaultNameProperty; @@ -73,7 +73,7 @@ public class CreateNewVaultPasswordController implements FxController { public Toggle skipRecoveryKey; @Inject - CreateNewVaultPasswordController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_NEW_LOCATION) Lazy chooseLocationScene, @FxmlScene(FxmlFile.ADDVAULT_NEW_RECOVERYKEY) Lazy recoveryKeyScene, @FxmlScene(FxmlFile.ADDVAULT_SUCCESS) Lazy successScene, ErrorComponent.Builder errorComponent, ExecutorService executor, RecoveryKeyFactory recoveryKeyFactory, @Named("vaultName") StringProperty vaultName, ObjectProperty vaultPath, @AddVaultWizardWindow ObjectProperty vault, @Named("recoveryKey") StringProperty recoveryKey, VaultListManager vaultListManager, ResourceBundle resourceBundle, @Named("newPassword") ObjectProperty password, ReadmeGenerator readmeGenerator) { + CreateNewVaultPasswordController(@AddVaultWizardWindow Stage window, @FxmlScene(FxmlFile.ADDVAULT_NEW_LOCATION) Lazy chooseLocationScene, @FxmlScene(FxmlFile.ADDVAULT_NEW_RECOVERYKEY) Lazy recoveryKeyScene, @FxmlScene(FxmlFile.ADDVAULT_SUCCESS) Lazy successScene, GenericErrorComponent.Builder errorComponent, ExecutorService executor, RecoveryKeyFactory recoveryKeyFactory, @Named("vaultName") StringProperty vaultName, ObjectProperty vaultPath, @AddVaultWizardWindow ObjectProperty vault, @Named("recoveryKey") StringProperty recoveryKey, VaultListManager vaultListManager, ResourceBundle resourceBundle, @Named("newPassword") ObjectProperty password, ReadmeGenerator readmeGenerator) { this.window = window; this.chooseLocationScene = chooseLocationScene; this.recoveryKeyScene = recoveryKeyScene; diff --git a/main/ui/src/main/java/org/cryptomator/ui/changepassword/ChangePasswordController.java b/main/ui/src/main/java/org/cryptomator/ui/changepassword/ChangePasswordController.java index eca3e5a8e..2a144898c 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/changepassword/ChangePasswordController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/changepassword/ChangePasswordController.java @@ -6,7 +6,7 @@ import org.cryptomator.cryptofs.CryptoFileSystemProvider; import org.cryptomator.cryptolib.api.InvalidPassphraseException; import org.cryptomator.integrations.keychain.KeychainAccessException; import org.cryptomator.ui.common.Animations; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.controls.NiceSecurePasswordField; import org.slf4j.Logger; @@ -23,7 +23,6 @@ import javafx.scene.control.CheckBox; import javafx.stage.Stage; import java.io.IOException; import java.nio.CharBuffer; -import java.util.Optional; import static org.cryptomator.common.Constants.MASTERKEY_FILENAME; @@ -35,7 +34,7 @@ public class ChangePasswordController implements FxController { private final Stage window; private final Vault vault; private final ObjectProperty newPassword; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; private final KeychainManager keychain; public NiceSecurePasswordField oldPasswordField; @@ -43,7 +42,7 @@ public class ChangePasswordController implements FxController { public Button finishButton; @Inject - public ChangePasswordController(@ChangePasswordWindow Stage window, @ChangePasswordWindow Vault vault, @Named("newPassword") ObjectProperty newPassword, ErrorComponent.Builder errorComponent, KeychainManager keychain) { + public ChangePasswordController(@ChangePasswordWindow Stage window, @ChangePasswordWindow Vault vault, @Named("newPassword") ObjectProperty newPassword, GenericErrorComponent.Builder errorComponent, KeychainManager keychain) { this.window = window; this.vault = vault; this.newPassword = newPassword; diff --git a/main/ui/src/main/java/org/cryptomator/ui/common/FxmlFile.java b/main/ui/src/main/java/org/cryptomator/ui/common/FxmlFile.java index 4d429ab7d..0270cce7f 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/common/FxmlFile.java +++ b/main/ui/src/main/java/org/cryptomator/ui/common/FxmlFile.java @@ -9,8 +9,8 @@ public enum FxmlFile { ADDVAULT_SUCCESS("/fxml/addvault_success.fxml"), // ADDVAULT_WELCOME("/fxml/addvault_welcome.fxml"), // CHANGEPASSWORD("/fxml/changepassword.fxml"), // - ERROR("/fxml/error.fxml"), // FORGET_PASSWORD("/fxml/forget_password.fxml"), // + GENERIC_ERROR("/fxml/generic_error.fxml"), // LOCK_FORCED("/fxml/lock_forced.fxml"), // LOCK_FAILED("/fxml/lock_failed.fxml"), // MAIN_WINDOW("/fxml/main_window.fxml"), // diff --git a/main/ui/src/main/java/org/cryptomator/ui/error/ErrorModule.java b/main/ui/src/main/java/org/cryptomator/ui/error/ErrorModule.java index dba3e41e8..b27a3271e 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/error/ErrorModule.java +++ b/main/ui/src/main/java/org/cryptomator/ui/error/ErrorModule.java @@ -39,13 +39,13 @@ abstract class ErrorModule { @Binds @IntoMap - @FxControllerKey(ErrorController.class) - abstract FxController bindErrorController(ErrorController controller); + @FxControllerKey(GenericErrorController.class) + abstract FxController bindErrorController(GenericErrorController controller); @Provides - @FxmlScene(FxmlFile.ERROR) + @FxmlScene(FxmlFile.GENERIC_ERROR) static Scene provideErrorScene(FxmlLoaderFactory fxmlLoaders) { - return fxmlLoaders.createScene(FxmlFile.ERROR); + return fxmlLoaders.createScene(FxmlFile.GENERIC_ERROR); } diff --git a/main/ui/src/main/java/org/cryptomator/ui/error/ErrorComponent.java b/main/ui/src/main/java/org/cryptomator/ui/error/GenericErrorComponent.java similarity index 88% rename from main/ui/src/main/java/org/cryptomator/ui/error/ErrorComponent.java rename to main/ui/src/main/java/org/cryptomator/ui/error/GenericErrorComponent.java index 666d4b715..f24c0f6f1 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/error/ErrorComponent.java +++ b/main/ui/src/main/java/org/cryptomator/ui/error/GenericErrorComponent.java @@ -11,11 +11,11 @@ import javafx.scene.Scene; import javafx.stage.Stage; @Subcomponent(modules = {ErrorModule.class}) -public interface ErrorComponent { +public interface GenericErrorComponent { Stage window(); - @FxmlScene(FxmlFile.ERROR) + @FxmlScene(FxmlFile.GENERIC_ERROR) Scene scene(); default void showErrorScene() { @@ -44,7 +44,7 @@ public interface ErrorComponent { @BindsInstance Builder returnToScene(@Nullable Scene previousScene); - ErrorComponent build(); + GenericErrorComponent build(); } diff --git a/main/ui/src/main/java/org/cryptomator/ui/error/ErrorController.java b/main/ui/src/main/java/org/cryptomator/ui/error/GenericErrorController.java similarity index 81% rename from main/ui/src/main/java/org/cryptomator/ui/error/ErrorController.java rename to main/ui/src/main/java/org/cryptomator/ui/error/GenericErrorController.java index f90ec09b1..86b99cd95 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/error/ErrorController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/error/GenericErrorController.java @@ -9,14 +9,14 @@ import javafx.fxml.FXML; import javafx.scene.Scene; import javafx.stage.Stage; -public class ErrorController implements FxController { +public class GenericErrorController implements FxController { private final String stackTrace; private final Scene previousScene; private final Stage window; @Inject - ErrorController(@Named("stackTrace") String stackTrace, @Nullable Scene previousScene, Stage window) { + GenericErrorController(@Named("stackTrace") String stackTrace, @Nullable Scene previousScene, Stage window) { this.stackTrace = stackTrace; this.previousScene = previousScene; this.window = window; diff --git a/main/ui/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java b/main/ui/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java index a904ed7b7..aa939354a 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java +++ b/main/ui/src/main/java/org/cryptomator/ui/fxapp/FxApplicationModule.java @@ -9,7 +9,7 @@ import dagger.Binds; import dagger.Module; import dagger.Provides; import org.apache.commons.lang3.SystemUtils; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.StageFactory; import org.cryptomator.ui.lock.LockComponent; import org.cryptomator.ui.mainwindow.MainWindowComponent; @@ -26,7 +26,7 @@ import java.io.UncheckedIOException; import java.util.Collections; import java.util.List; -@Module(includes = {UpdateCheckerModule.class}, subcomponents = {MainWindowComponent.class, PreferencesComponent.class, UnlockComponent.class, LockComponent.class, QuitComponent.class, ErrorComponent.class}) +@Module(includes = {UpdateCheckerModule.class}, subcomponents = {MainWindowComponent.class, PreferencesComponent.class, UnlockComponent.class, LockComponent.class, QuitComponent.class, GenericErrorComponent.class}) abstract class FxApplicationModule { @Provides diff --git a/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java b/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java index 444b78166..621939840 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/migration/MigrationRunController.java @@ -12,7 +12,7 @@ import org.cryptomator.cryptofs.migration.api.MigrationProgressListener; import org.cryptomator.cryptolib.api.InvalidPassphraseException; import org.cryptomator.integrations.keychain.KeychainAccessException; import org.cryptomator.ui.common.Animations; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; @@ -56,7 +56,7 @@ public class MigrationRunController implements FxController { private final ScheduledExecutorService scheduler; private final KeychainManager keychain; private final ObjectProperty missingCapability; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; private final Lazy startScene; private final Lazy successScene; private final Lazy impossibleScene; @@ -68,7 +68,7 @@ public class MigrationRunController implements FxController { public NiceSecurePasswordField passwordField; @Inject - public MigrationRunController(@MigrationWindow Stage window, @MigrationWindow Vault vault, ExecutorService executor, ScheduledExecutorService scheduler, KeychainManager keychain, @Named("capabilityErrorCause") ObjectProperty missingCapability, @FxmlScene(FxmlFile.MIGRATION_START) Lazy startScene, @FxmlScene(FxmlFile.MIGRATION_SUCCESS) Lazy successScene, @FxmlScene(FxmlFile.MIGRATION_CAPABILITY_ERROR) Lazy capabilityErrorScene, @FxmlScene(FxmlFile.MIGRATION_IMPOSSIBLE) Lazy impossibleScene, ErrorComponent.Builder errorComponent) { + public MigrationRunController(@MigrationWindow Stage window, @MigrationWindow Vault vault, ExecutorService executor, ScheduledExecutorService scheduler, KeychainManager keychain, @Named("capabilityErrorCause") ObjectProperty missingCapability, @FxmlScene(FxmlFile.MIGRATION_START) Lazy startScene, @FxmlScene(FxmlFile.MIGRATION_SUCCESS) Lazy successScene, @FxmlScene(FxmlFile.MIGRATION_CAPABILITY_ERROR) Lazy capabilityErrorScene, @FxmlScene(FxmlFile.MIGRATION_IMPOSSIBLE) Lazy impossibleScene, GenericErrorComponent.Builder errorComponent) { this.window = window; this.vault = vault; this.executor = executor; diff --git a/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java b/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java index a6bb52ee5..5258d9364 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/preferences/GeneralPreferencesController.java @@ -8,7 +8,7 @@ import org.cryptomator.common.settings.UiTheme; import org.cryptomator.integrations.autostart.AutoStartProvider; import org.cryptomator.integrations.autostart.ToggleAutoStartFailedException; import org.cryptomator.integrations.keychain.KeychainAccessProvider; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.traymenu.TrayMenuComponent; import org.slf4j.Logger; @@ -49,7 +49,7 @@ public class GeneralPreferencesController implements FxController { private final Application application; private final Environment environment; private final Set keychainAccessProviders; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; public ChoiceBox themeChoiceBox; public ChoiceBox keychainBackendChoiceBox; public CheckBox showMinimizeButtonCheckbox; @@ -63,7 +63,7 @@ public class GeneralPreferencesController implements FxController { @Inject - GeneralPreferencesController(@PreferencesWindow Stage window, Settings settings, TrayMenuComponent trayMenu, Optional autoStartProvider, Set keychainAccessProviders, ObjectProperty selectedTabProperty, LicenseHolder licenseHolder, ResourceBundle resourceBundle, Application application, Environment environment, ErrorComponent.Builder errorComponent) { + GeneralPreferencesController(@PreferencesWindow Stage window, Settings settings, TrayMenuComponent trayMenu, Optional autoStartProvider, Set keychainAccessProviders, ObjectProperty selectedTabProperty, LicenseHolder licenseHolder, ResourceBundle resourceBundle, Application application, Environment environment, GenericErrorComponent.Builder errorComponent) { this.window = window; this.settings = settings; this.trayMenuInitialized = trayMenu.isInitialized(); diff --git a/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java b/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java index 2bbb9b0b2..7f8025436 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyCreationController.java @@ -4,7 +4,7 @@ import dagger.Lazy; import org.cryptomator.common.vaults.Vault; import org.cryptomator.cryptolib.api.InvalidPassphraseException; import org.cryptomator.ui.common.Animations; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; @@ -32,11 +32,11 @@ public class RecoveryKeyCreationController implements FxController { private final ExecutorService executor; private final RecoveryKeyFactory recoveryKeyFactory; private final StringProperty recoveryKeyProperty; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; public NiceSecurePasswordField passwordField; @Inject - public RecoveryKeyCreationController(@RecoveryKeyWindow Stage window, @FxmlScene(FxmlFile.RECOVERYKEY_SUCCESS) Lazy successScene, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, ErrorComponent.Builder errorComponent) { + public RecoveryKeyCreationController(@RecoveryKeyWindow Stage window, @FxmlScene(FxmlFile.RECOVERYKEY_SUCCESS) Lazy successScene, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, GenericErrorComponent.Builder errorComponent) { this.window = window; this.successScene = successScene; this.vault = vault; diff --git a/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java b/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java index 37d309ef6..f93e0f126 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/recoverykey/RecoveryKeyResetPasswordController.java @@ -2,7 +2,7 @@ package org.cryptomator.ui.recoverykey; import dagger.Lazy; import org.cryptomator.common.vaults.Vault; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; @@ -35,10 +35,10 @@ public class RecoveryKeyResetPasswordController implements FxController { private final ObjectProperty newPassword; private final Lazy recoverScene; private final BooleanBinding invalidNewPassword; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; @Inject - public RecoveryKeyResetPasswordController(@RecoveryKeyWindow Stage window, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, @Named("newPassword") ObjectProperty newPassword, @FxmlScene(FxmlFile.RECOVERYKEY_RECOVER) Lazy recoverScene, ErrorComponent.Builder errorComponent) { + public RecoveryKeyResetPasswordController(@RecoveryKeyWindow Stage window, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, @Named("newPassword") ObjectProperty newPassword, @FxmlScene(FxmlFile.RECOVERYKEY_RECOVER) Lazy recoverScene, GenericErrorComponent.Builder errorComponent) { this.window = window; this.vault = vault; this.recoveryKeyFactory = recoveryKeyFactory; diff --git a/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java b/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java index 99af514f0..f96f14f99 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java +++ b/main/ui/src/main/java/org/cryptomator/ui/unlock/UnlockWorkflow.java @@ -10,7 +10,7 @@ import org.cryptomator.common.vaults.Volume.VolumeException; import org.cryptomator.cryptolib.api.InvalidPassphraseException; import org.cryptomator.integrations.keychain.KeychainAccessException; import org.cryptomator.ui.common.Animations; -import org.cryptomator.ui.error.ErrorComponent; +import org.cryptomator.ui.error.GenericErrorComponent; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; import org.cryptomator.ui.common.UserInteractionLock; @@ -57,10 +57,10 @@ public class UnlockWorkflow extends Task { private final Lazy unlockScene; private final Lazy successScene; private final Lazy invalidMountPointScene; - private final ErrorComponent.Builder errorComponent; + private final GenericErrorComponent.Builder errorComponent; @Inject - UnlockWorkflow(@UnlockWindow Stage window, @UnlockWindow Vault vault, VaultService vaultService, AtomicReference password, @Named("savePassword") AtomicBoolean savePassword, @Named("savedPassword") Optional savedPassword, UserInteractionLock passwordEntryLock, KeychainManager keychain, @FxmlScene(FxmlFile.UNLOCK) Lazy unlockScene, @FxmlScene(FxmlFile.UNLOCK_SUCCESS) Lazy successScene, @FxmlScene(FxmlFile.UNLOCK_INVALID_MOUNT_POINT) Lazy invalidMountPointScene, ErrorComponent.Builder errorComponent) { + UnlockWorkflow(@UnlockWindow Stage window, @UnlockWindow Vault vault, VaultService vaultService, AtomicReference password, @Named("savePassword") AtomicBoolean savePassword, @Named("savedPassword") Optional savedPassword, UserInteractionLock passwordEntryLock, KeychainManager keychain, @FxmlScene(FxmlFile.UNLOCK) Lazy unlockScene, @FxmlScene(FxmlFile.UNLOCK_SUCCESS) Lazy successScene, @FxmlScene(FxmlFile.UNLOCK_INVALID_MOUNT_POINT) Lazy invalidMountPointScene, GenericErrorComponent.Builder errorComponent) { this.window = window; this.vault = vault; this.vaultService = vaultService; diff --git a/main/ui/src/main/resources/fxml/error.fxml b/main/ui/src/main/resources/fxml/generic_error.fxml similarity index 95% rename from main/ui/src/main/resources/fxml/error.fxml rename to main/ui/src/main/resources/fxml/generic_error.fxml index 1a8c7c878..cfc745e1e 100644 --- a/main/ui/src/main/resources/fxml/error.fxml +++ b/main/ui/src/main/resources/fxml/generic_error.fxml @@ -12,7 +12,7 @@