Skip to content

Commit

Permalink
Show connection warning when service is not available (#1239)
Browse files Browse the repository at this point in the history
IB-7912

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Dec 4, 2023
1 parent e321e6f commit 4384a8c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client/DigiDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,19 @@ struct ServiceConfirmation final: public ContainerOpenCB
ServiceConfirmation(QWidget *_parent): parent(_parent) {}
bool validateOnline() const final {
if(!CheckConnection().check())
return false;
return dispatchToMain([this] {
WarningDialog::show(parent, DigiDoc::tr("Connecting to SiVa server failed! Please check your internet connection and network settings."));
return false;
});
return dispatchToMain([this] {
auto *dlg = new WarningDialog(DigiDoc::tr("This type of signed document will be transmitted to the "
"Digital Signature Validation Service SiVa to verify the validity of the digital signature. "
"Read more information about transmitted data to Digital Signature Validation service from "
"<a href=\"https://www.id.ee/en/article/data-protection-conditions-for-the-id-software-of-the-national-information-system-authority/\">here</a>.<br />"
"Do you want to continue?"), parent);
dlg->setCancelText(WarningDialog::Cancel);
dlg->addButton(WarningDialog::YES, ContainerSave);
return dlg->exec() == ContainerSave;
dlg->addButton(WarningDialog::YES, 1);
return dlg->exec() == 1;
});
}
Q_DISABLE_COPY(ServiceConfirmation)
Expand Down

0 comments on commit 4384a8c

Please sign in to comment.