-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #382 from slovensko-digital/AG-117/windows-eidpkcs…
…-cannot-initialize-message Add custom error info on Windows eID PKCS missing dll dependecies
- Loading branch information
Showing
6 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/digital/slovensko/autogram/core/errors/PkcsEidWindowsDllException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package digital.slovensko.autogram.core.errors; | ||
|
||
public class PkcsEidWindowsDllException extends AutogramException { | ||
public PkcsEidWindowsDllException(Exception e) { | ||
super("Chyba komunikácie s kartou", "Ovládač nie je možné použiť", "Nie je možné použiť ovládač pre podpisovanie vybranou kartou. Pravdepodobne je potrebné do systému nainštalovať balík Microsoft Visual C++ 2015 Redistributable.\n\nAk to nepomôže, kontaktujte nás na [email protected]", e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/digital/slovensko/autogram/ui/gui/PkcsEidWindowsDllErrorController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package digital.slovensko.autogram.ui.gui; | ||
|
||
import javafx.application.HostServices; | ||
import javafx.fxml.FXML; | ||
import javafx.event.ActionEvent; | ||
import javafx.scene.Node; | ||
import javafx.scene.layout.VBox; | ||
import javafx.stage.Stage; | ||
|
||
public class PkcsEidWindowsDllErrorController implements SuppressedFocusController { | ||
private final HostServices hostServices; | ||
|
||
@FXML | ||
VBox mainBox; | ||
|
||
public PkcsEidWindowsDllErrorController(HostServices hostServices) { | ||
this.hostServices = hostServices; | ||
} | ||
|
||
public void downloadAction(ActionEvent ignored) { | ||
hostServices.showDocument("https://sluzby.slovensko.digital/autogram/vc-redist-redirect"); | ||
} | ||
|
||
public void onMainButtonAction() { | ||
((Stage) mainBox.getScene().getWindow()).close(); | ||
} | ||
|
||
@Override | ||
public Node getNodeForLoosingFocus() { | ||
return mainBox; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/resources/digital/slovensko/autogram/ui/gui/pkcs-eid-windows-dll-error-dialog.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<?import javafx.scene.text.TextFlow?> | ||
<?import javafx.scene.text.Text?> | ||
|
||
<VBox xmlns="http://javafx.com/javafx" | ||
xmlns:fx="http://javafx.com/fxml" | ||
prefWidth="450" minWidth="450" | ||
fx:id="mainBox"> | ||
|
||
<VBox styleClass="autogram-error-summary"> | ||
<TextFlow styleClass="autogram-error-summary__title"> | ||
<Text>Chyba komunikácie s kartou</Text> | ||
</TextFlow> | ||
<TextFlow styleClass="autogram-error-summary__error"> | ||
<Text>Ovládač nie je možné použiť</Text> | ||
</TextFlow> | ||
<TextFlow styleClass="autogram-error-summary__description,autogram-body-s"> | ||
<Text text="Nie je možné použiť ovládač pre podpisovanie vybranou kartou. Pravdepodobne je potrebné do systému nainštalovať balík "/> | ||
<Hyperlink styleClass="autogram-body-s,autogram-link" text="Microsoft Visual C++ 2015 Redistributable" onAction="#downloadAction"/> | ||
</TextFlow> | ||
<TextFlow styleClass="autogram-error-summary__description,autogram-body-s"> | ||
<Text>Ak to nepomôže, kontaktujte nás na [email protected]</Text> | ||
</TextFlow> | ||
</VBox> | ||
|
||
|
||
<HBox styleClass="autogram-actions"> | ||
<Button fx:id="mainButton" styleClass="autogram-button,autogram-button--secondary" | ||
text="Pokračovať" onAction="#onMainButtonAction" /> | ||
</HBox> | ||
|
||
<TextArea fx:id="errorDetails" styleClass="autogram-details__text" editable="false" | ||
visible="false" managed="false">Error details</TextArea> | ||
</VBox> |