added display of amnesia dns container activity on the main page
This commit is contained in:
parent
2ef53c6df9
commit
795405c47d
21 changed files with 238 additions and 85 deletions
|
@ -83,11 +83,13 @@ void ConnectionController::onConnectionStateChanged(Vpn::ConnectionState state)
|
|||
}
|
||||
case Vpn::ConnectionState::Error: {
|
||||
m_isConnectionInProgress = false;
|
||||
m_connectionStateText = tr("Connect");
|
||||
emit connectionErrorOccurred(getLastConnectionError());
|
||||
break;
|
||||
}
|
||||
case Vpn::ConnectionState::Unknown: {
|
||||
m_isConnectionInProgress = false;
|
||||
m_connectionStateText = tr("Connect");
|
||||
emit connectionErrorOccurred(getLastConnectionError());
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -8,15 +8,10 @@
|
|||
|
||||
SettingsController::SettingsController(const QSharedPointer<ServersModel> &serversModel,
|
||||
const QSharedPointer<ContainersModel> &containersModel,
|
||||
const std::shared_ptr<Settings> &settings,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_serversModel(serversModel)
|
||||
, m_containersModel(containersModel)
|
||||
, m_settings(settings)
|
||||
const std::shared_ptr<Settings> &settings, QObject *parent)
|
||||
: QObject(parent), m_serversModel(serversModel), m_containersModel(containersModel), m_settings(settings)
|
||||
{
|
||||
m_appVersion = QString("%1: %2 (%3)")
|
||||
.arg(tr("Software version"), QString(APP_MAJOR_VERSION), __DATE__);
|
||||
m_appVersion = QString("%1: %2 (%3)").arg(tr("Software version"), QString(APP_MAJOR_VERSION), __DATE__);
|
||||
}
|
||||
|
||||
void SettingsController::setAmneziaDns(bool enable)
|
||||
|
@ -79,21 +74,16 @@ void SettingsController::clearLogs()
|
|||
|
||||
void SettingsController::backupAppConfig()
|
||||
{
|
||||
Utils::saveFile(".backup",
|
||||
tr("Backup application config"),
|
||||
"AmneziaVPN",
|
||||
m_settings->backupAppConfig());
|
||||
Utils::saveFile(".backup", tr("Backup application config"), "AmneziaVPN", m_settings->backupAppConfig());
|
||||
}
|
||||
|
||||
void SettingsController::restoreAppConfig()
|
||||
{
|
||||
QString fileName = Utils::getFileName(Q_NULLPTR,
|
||||
tr("Open backup"),
|
||||
QStandardPaths::writableLocation(
|
||||
QStandardPaths::DocumentsLocation),
|
||||
"*.backup");
|
||||
QString fileName =
|
||||
Utils::getFileName(Q_NULLPTR, tr("Open backup"),
|
||||
QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), "*.backup");
|
||||
|
||||
//todo error processing
|
||||
// todo error processing
|
||||
if (fileName.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -12,12 +12,10 @@ class SettingsController : public QObject
|
|||
public:
|
||||
explicit SettingsController(const QSharedPointer<ServersModel> &serversModel,
|
||||
const QSharedPointer<ContainersModel> &containersModel,
|
||||
const std::shared_ptr<Settings> &settings,
|
||||
QObject *parent = nullptr);
|
||||
const std::shared_ptr<Settings> &settings, QObject *parent = nullptr);
|
||||
|
||||
Q_PROPERTY(QString primaryDns READ getPrimaryDns WRITE setPrimaryDns NOTIFY primaryDnsChanged)
|
||||
Q_PROPERTY(
|
||||
QString secondaryDns READ getSecondaryDns WRITE setSecondaryDns NOTIFY secondaryDnsChanged)
|
||||
Q_PROPERTY(QString secondaryDns READ getSecondaryDns WRITE setSecondaryDns NOTIFY secondaryDnsChanged)
|
||||
|
||||
public slots:
|
||||
void setAmneziaDns(bool enable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue