mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-26 21:40:29 +00:00
Updated UI
This commit is contained in:
parent
88c6246ceb
commit
cca6d475b3
@ -52,12 +52,22 @@ public class UnlockInvalidMountPointController implements FxController {
|
||||
window.close();
|
||||
}
|
||||
|
||||
public boolean isShowPreferences() {
|
||||
return exceptionType.showPreferences;
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void closeAndOpenPreferences() {
|
||||
appWindows.showPreferencesWindow(SelectedPreferencesTab.VOLUME);
|
||||
window.close();
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void closeAndOpenVaultOptions() {
|
||||
//TODO
|
||||
window.close();
|
||||
}
|
||||
|
||||
private ExceptionType getExceptionType(Throwable unlockException) {
|
||||
return switch (unlockException) {
|
||||
case MountPointNotSupportedException x -> ExceptionType.NOT_SUPPORTED;
|
||||
@ -69,15 +79,17 @@ public class UnlockInvalidMountPointController implements FxController {
|
||||
|
||||
private enum ExceptionType {
|
||||
|
||||
NOT_SUPPORTED("unlock.error.customPath.description.notSupported"),
|
||||
NOT_EXISTING("unlock.error.customPath.description.notExists"),
|
||||
IN_USE("unlock.error.customPath.description.inUse"),
|
||||
GENERIC("unlock.error.customPath.description.generic");
|
||||
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);
|
||||
|
||||
private final String translationKey;
|
||||
private final boolean showPreferences;
|
||||
|
||||
ExceptionType(String translationKey) {
|
||||
ExceptionType(String translationKey, boolean showPreferences) {
|
||||
this.translationKey = translationKey;
|
||||
this.showPreferences = showPreferences;
|
||||
}
|
||||
}
|
||||
}
|
@ -46,7 +46,8 @@
|
||||
<ButtonBar buttonMinWidth="120" buttonOrder="+CI">
|
||||
<buttons>
|
||||
<Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#close"/>
|
||||
<Button text="%hub.noKeychain.openBtn" ButtonBar.buttonData="FINISH" defaultButton="true" onAction="#closeAndOpenPreferences"/>
|
||||
<Button text="%hub.noKeychain.openBtn" ButtonBar.buttonData="FINISH" defaultButton="true" onAction="#closeAndOpenPreferences" visible="${controller.showPreferences}" managed="${controller.showPreferences}"/>
|
||||
<Button text="%main.vaultDetail.optionsBtn" ButtonBar.buttonData="FINISH" defaultButton="true" onAction="#closeAndOpenVaultOptions" visible="${!controller.showPreferences}" managed="${!controller.showPreferences}"/>
|
||||
</buttons>
|
||||
</ButtonBar>
|
||||
</VBox>
|
||||
|
Loading…
Reference in New Issue
Block a user