forked from Silverfish/proton-bridge
GODT-1847: add option to export TLS Certificates in GUI.
This commit is contained in:
@ -166,6 +166,9 @@ void QMLBackend::connectGrpcEvents()
|
||||
connect(client, &GRPCClient::addressChangedLogout, this, &QMLBackend::addressChangedLogout);
|
||||
connect(client, &GRPCClient::apiCertIssue, this, &QMLBackend::apiCertIssue);
|
||||
|
||||
// generic error events
|
||||
connect(client, &GRPCClient::genericError, this, &QMLBackend::onGenericError);
|
||||
|
||||
// user events
|
||||
connect(client, &GRPCClient::userDisconnected, this, &QMLBackend::userDisconnected);
|
||||
users_->connectGRPCEvents();
|
||||
@ -439,6 +442,15 @@ void QMLBackend::onMailServerSettingsChanged(int imapPort, int smtpPort, bool us
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
//
|
||||
//****************************************************************************************************************************************************
|
||||
void QMLBackend::onGenericError(ErrorInfo const &info)
|
||||
{
|
||||
emit genericError(info.title, info.description);
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
/// \param[in] active Should DoH be active.
|
||||
//****************************************************************************************************************************************************
|
||||
@ -514,3 +526,15 @@ void QMLBackend::onVersionChanged()
|
||||
emit releaseNotesLinkChanged(releaseNotesLink());
|
||||
emit landingPageLinkChanged(landingPageLink());
|
||||
}
|
||||
|
||||
|
||||
//****************************************************************************************************************************************************
|
||||
//
|
||||
//****************************************************************************************************************************************************
|
||||
void QMLBackend::exportTLSCertificates()
|
||||
{
|
||||
QString const folderPath = QFileDialog::getExistingDirectory(nullptr, QObject::tr("Select directory"),
|
||||
QStandardPaths::writableLocation(QStandardPaths::HomeLocation));
|
||||
if (!folderPath.isEmpty())
|
||||
app().grpc().exportTLSCertificates(folderPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user