Added display of a notification about the inclusion of logging on the main screen
This commit is contained in:
parent
3f257af7a9
commit
ce4ca5c4d5
4 changed files with 26 additions and 1 deletions
|
@ -68,7 +68,7 @@ public:
|
|||
void setStartMinimized(bool enabled) { m_settings.setValue("Conf/startMinimized", enabled); }
|
||||
|
||||
bool isSaveLogs() const { return m_settings.value("Conf/saveLogs", false).toBool(); }
|
||||
void setSaveLogs(bool enabled) { m_settings.setValue("Conf/saveLogs", enabled); }
|
||||
void setSaveLogs(bool enabled);
|
||||
|
||||
enum RouteMode {
|
||||
VpnAllSites,
|
||||
|
@ -113,6 +113,9 @@ public:
|
|||
QByteArray backupAppConfig() const { return m_settings.backupAppConfig(); }
|
||||
bool restoreAppConfig(const QByteArray &cfg) { return m_settings.restoreAppConfig(cfg); }
|
||||
|
||||
signals:
|
||||
void updateVpnPage();
|
||||
|
||||
private:
|
||||
SecureQSettings m_settings;
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ VpnLogic::VpnLogic(UiLogic *logic, QObject *parent):
|
|||
connect(this, &VpnLogic::connectToVpn, uiLogic()->m_vpnConnection, &VpnConnection::connectToVpn, Qt::QueuedConnection);
|
||||
connect(this, &VpnLogic::disconnectFromVpn, uiLogic()->m_vpnConnection, &VpnConnection::disconnectFromVpn, Qt::QueuedConnection);
|
||||
|
||||
connect(m_settings.get(), &Settings::updateVpnPage, this, &VpnLogic::onUpdatePage);
|
||||
|
||||
if (m_settings->isAutoConnect() && m_settings->defaultServerIndex() >= 0) {
|
||||
QTimer::singleShot(1000, this, [this](){
|
||||
set_pushButtonConnectEnabled(false);
|
||||
|
@ -88,6 +90,8 @@ void VpnLogic::onUpdatePage()
|
|||
}
|
||||
QString ver = QString("v. %2").arg(QString(APP_MAJOR_VERSION));
|
||||
set_labelVersionText(ver);
|
||||
|
||||
set_labelLogEnabledVisible(m_settings->isSaveLogs());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ class VpnLogic : public PageLogicBase
|
|||
AUTO_PROPERTY(bool, radioButtonVpnModeForwardSitesChecked)
|
||||
AUTO_PROPERTY(bool, radioButtonVpnModeExceptSitesChecked)
|
||||
|
||||
AUTO_PROPERTY(bool, labelLogEnabledVisible)
|
||||
|
||||
public:
|
||||
Q_INVOKABLE void onUpdatePage() override;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ PageBase {
|
|||
}
|
||||
|
||||
BasicButtonType {
|
||||
id: button_donate
|
||||
y: 10
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
height: 21
|
||||
|
@ -70,6 +71,21 @@ PageBase {
|
|||
}
|
||||
}
|
||||
|
||||
LabelType {
|
||||
id: lb_log_enabled
|
||||
anchors.top: button_donate.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width
|
||||
height: 21
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
text: "Logging enabled!"
|
||||
color: "#D4D4D4"
|
||||
|
||||
visible: VpnLogic.labelLogEnabledVisible
|
||||
}
|
||||
|
||||
AnimatedImage {
|
||||
id: connect_anim
|
||||
source: "qrc:/images/animation.gif"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue