From 99ca7168e367b10d22b539d96ff03e52439f22b4 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 11 Mar 2020 17:00:02 +0100 Subject: [PATCH] reworking the wrong file alert dialogue --- .../WrongFileAlertController.java | 14 +++++- .../main/resources/fxml/wrongfilealert.fxml | 48 +++++++++++++++---- .../main/resources/i18n/strings.properties | 11 +++-- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertController.java b/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertController.java index 7d2efcf26..350580d98 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertController.java @@ -1,5 +1,8 @@ package org.cryptomator.ui.wrongfilealert; +import javafx.application.Application; +import javafx.beans.property.StringProperty; +import javafx.fxml.FXML; import javafx.stage.Stage; import org.cryptomator.ui.common.FxController; @@ -8,14 +11,23 @@ import javax.inject.Inject; @WrongFileAlertScoped public class WrongFileAlertController implements FxController { + private static final String DOCUMENTATION_URI = "https://docs.cryptomator.org"; + + private Application app; private final Stage window; @Inject - public WrongFileAlertController(@WrongFileAlertWindow Stage window) { + public WrongFileAlertController(@WrongFileAlertWindow Stage window, Application app) { this.window = window; + this.app = app; } public void close() { window.close(); } + + @FXML + public void openDocumentation() { + app.getHostServices().showDocument(DOCUMENTATION_URI); + } } diff --git a/main/ui/src/main/resources/fxml/wrongfilealert.fxml b/main/ui/src/main/resources/fxml/wrongfilealert.fxml index 8251e1024..b5861454e 100644 --- a/main/ui/src/main/resources/fxml/wrongfilealert.fxml +++ b/main/ui/src/main/resources/fxml/wrongfilealert.fxml @@ -3,35 +3,67 @@ + + + + + + minWidth="450" + maxWidth="450" + minHeight="-Infinity" + spacing="24" + alignment="CENTER"> - + - + - + + + + + + + + + + + + + + -