diff --git a/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java b/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java index 2fb005bac..83bd80df4 100644 --- a/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java +++ b/src/main/java/org/cryptomator/ui/unlock/UnlockInvalidMountPointController.java @@ -75,23 +75,34 @@ public class UnlockInvalidMountPointController implements FxController { private enum ExceptionType { - NOT_SUPPORTED("unlock.error.customPath.description.notSupported", true), - NOT_EXISTING("unlock.error.customPath.description.notExists", false), - IN_USE("unlock.error.customPath.description.inUse", false), - GENERIC("unlock.error.customPath.description.generic", true); + NOT_SUPPORTED("unlock.error.customPath.description.notSupported", ButtonAction.SHOW_PREFERENCES), + NOT_EXISTING("unlock.error.customPath.description.notExists", ButtonAction.SHOW_VAULT_OPTIONS), + IN_USE("unlock.error.customPath.description.inUse", ButtonAction.SHOW_VAULT_OPTIONS), + GENERIC("unlock.error.customPath.description.generic", ButtonAction.SHOW_PREFERENCES); private final String translationKey; - private final boolean showPreferences; + private final ButtonAction action; - ExceptionType(String translationKey, boolean showPreferences) { + ExceptionType(String translationKey, ButtonAction action) { this.translationKey = translationKey; - this.showPreferences = showPreferences; + this.action = action; } } + private enum ButtonAction { + + SHOW_PREFERENCES, + SHOW_VAULT_OPTIONS; + + } + /* Getter */ public boolean isShowPreferences() { - return exceptionType.showPreferences; + return exceptionType.action == ButtonAction.SHOW_PREFERENCES; + } + + public boolean isShowVaultOptions() { + return exceptionType.action == ButtonAction.SHOW_VAULT_OPTIONS; } } \ No newline at end of file diff --git a/src/main/resources/fxml/unlock_invalid_mount_point.fxml b/src/main/resources/fxml/unlock_invalid_mount_point.fxml index 1646ef47a..c6f1a31f2 100644 --- a/src/main/resources/fxml/unlock_invalid_mount_point.fxml +++ b/src/main/resources/fxml/unlock_invalid_mount_point.fxml @@ -47,7 +47,7 @@