From c19a86a3484407826d0ba41824f17bedf4e4b6bc Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Tue, 7 Feb 2023 15:23:04 +0100 Subject: [PATCH] add link to mounting documentation --- .../ui/preferences/VolumePreferencesController.java | 12 +++++++++++- src/main/resources/fxml/preferences_volume.fxml | 12 ++++++++++++ src/main/resources/i18n/strings.properties | 2 ++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/ui/preferences/VolumePreferencesController.java b/src/main/java/org/cryptomator/ui/preferences/VolumePreferencesController.java index 00e680d2d..4784efceb 100644 --- a/src/main/java/org/cryptomator/ui/preferences/VolumePreferencesController.java +++ b/src/main/java/org/cryptomator/ui/preferences/VolumePreferencesController.java @@ -1,5 +1,6 @@ package org.cryptomator.ui.preferences; +import dagger.Lazy; import org.cryptomator.common.ObservableUtil; import org.cryptomator.common.settings.Settings; import org.cryptomator.integrations.mount.MountCapability; @@ -7,6 +8,7 @@ import org.cryptomator.integrations.mount.MountService; import org.cryptomator.ui.common.FxController; import javax.inject.Inject; +import javafx.application.Application; import javafx.beans.binding.Bindings; import javafx.beans.binding.BooleanExpression; import javafx.beans.value.ObservableValue; @@ -21,6 +23,8 @@ import java.util.ResourceBundle; @PreferencesScoped public class VolumePreferencesController implements FxController { + private static final String DOCS_MOUNTING_URL = "https://docs.cryptomator.org/en/1.7/desktop/vault-mounting/"; + private final Settings settings; private final ObservableValue selectedMountService; private final ResourceBundle resourceBundle; @@ -29,14 +33,16 @@ public class VolumePreferencesController implements FxController { private final ObservableValue mountToDriveLetterSupported; private final ObservableValue mountFlagsSupported; private final ObservableValue readonlySupported; + private final Lazy application; private final List mountProviders; public ChoiceBox volumeTypeChoiceBox; public TextField loopbackPortField; public Button loopbackPortApplyButton; @Inject - VolumePreferencesController(Settings settings, List mountProviders, ResourceBundle resourceBundle) { + VolumePreferencesController(Settings settings, Lazy application, List mountProviders, ResourceBundle resourceBundle) { this.settings = settings; + this.application = application; this.mountProviders = mountProviders; this.resourceBundle = resourceBundle; @@ -141,4 +147,8 @@ public class VolumePreferencesController implements FxController { throw new UnsupportedOperationException(); } } + + public void openDocs() { + application.get().getHostServices().showDocument(DOCS_MOUNTING_URL); + } } diff --git a/src/main/resources/fxml/preferences_volume.fxml b/src/main/resources/fxml/preferences_volume.fxml index 92df77e3d..ed41a746b 100644 --- a/src/main/resources/fxml/preferences_volume.fxml +++ b/src/main/resources/fxml/preferences_volume.fxml @@ -5,6 +5,7 @@ + @@ -58,5 +59,16 @@ + + + + + diff --git a/src/main/resources/i18n/strings.properties b/src/main/resources/i18n/strings.properties index fbee45826..dafb573a9 100644 --- a/src/main/resources/i18n/strings.properties +++ b/src/main/resources/i18n/strings.properties @@ -278,6 +278,8 @@ preferences.interface.showTrayIcon=Show tray icon (requires restart) preferences.volume=Virtual Drive preferences.volume.type=Volume Type (requires restart) preferences.volume.type.automatic=Automatic +preferences.volume.docs.description=More information about the different volume types can be found in the user documentation. +preferences.volume.docs.linkText=Open Cryptomator Docs preferences.volume.tcp.port=TCP Port preferences.volume.supportedFeatures=The chosen volume type supports the following features: preferences.volume.feature.mountAuto=Automatic mount point selection