refactoring
This commit is contained in:
parent
ddca4f9068
commit
5932db24e1
3 changed files with 90 additions and 101 deletions
|
|
@ -8,29 +8,27 @@ using namespace PageEnumNS;
|
||||||
|
|
||||||
OpenVpnLogic::OpenVpnLogic(UiLogic *logic, QObject *parent):
|
OpenVpnLogic::OpenVpnLogic(UiLogic *logic, QObject *parent):
|
||||||
PageProtocolLogicBase(logic, parent),
|
PageProtocolLogicBase(logic, parent),
|
||||||
m_lineEditProtoOpenVpnSubnetText{""},
|
m_lineEditSubnetText{""},
|
||||||
|
|
||||||
m_radioButtonProtoOpenVpnTcpEnabled{true},
|
m_radioButtonTcpEnabled{true},
|
||||||
m_radioButtonProtoOpenVpnTcpChecked{false},
|
m_radioButtonTcpChecked{false},
|
||||||
m_radioButtonProtoOpenVpnUdpEnabled{true},
|
m_radioButtonUdpEnabled{true},
|
||||||
m_radioButtonProtoOpenVpnUdpChecked{false},
|
m_radioButtonUdpChecked{false},
|
||||||
|
|
||||||
m_checkBoxProtoOpenVpnAutoEncryptionChecked{},
|
m_checkBoxAutoEncryptionChecked{},
|
||||||
m_comboBoxProtoOpenVpnCipherText{"AES-256-GCM"},
|
m_comboBoxVpnCipherText{"AES-256-GCM"},
|
||||||
m_comboBoxProtoOpenVpnHashText{"SHA512"},
|
m_comboBoxVpnHashText{"SHA512"},
|
||||||
m_checkBoxProtoOpenVpnBlockDnsChecked{false},
|
m_checkBoxBlockDnsChecked{false},
|
||||||
m_lineEditProtoOpenVpnPortText{},
|
m_lineEditPortText{},
|
||||||
m_checkBoxProtoOpenVpnTlsAuthChecked{false},
|
m_checkBoxTlsAuthChecked{false},
|
||||||
m_pushButtonOpenvpnSaveVisible{false},
|
m_pushButtonSaveVisible{false},
|
||||||
m_progressBarProtoOpenVpnResetVisible{false},
|
m_progressBarResetVisible{false},
|
||||||
|
|
||||||
m_lineEditProtoOpenVpnPortEnabled{false},
|
m_lineEditPortEnabled{false},
|
||||||
m_comboBoxProtoOpenVpnCipherEnabled{true},
|
|
||||||
m_comboBoxProtoOpenVpnHashEnabled{true},
|
|
||||||
m_labelProtoOpenVpnInfoVisible{true},
|
m_labelProtoOpenVpnInfoVisible{true},
|
||||||
m_labelProtoOpenVpnInfoText{},
|
m_labelProtoOpenVpnInfoText{},
|
||||||
m_progressBarProtoOpenVpnResetValue{0},
|
m_progressBarResetValue{0},
|
||||||
m_progressBarProtoOpenVpnResetMaximium{100}
|
m_progressBarResetMaximium{100}
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -39,52 +37,46 @@ void OpenVpnLogic::updateProtocolPage(const QJsonObject &openvpnConfig, DockerCo
|
||||||
{
|
{
|
||||||
qDebug() << "OpenVpnLogic::updateProtocolPage";
|
qDebug() << "OpenVpnLogic::updateProtocolPage";
|
||||||
set_pageEnabled(haveAuthData);
|
set_pageEnabled(haveAuthData);
|
||||||
set_pushButtonOpenvpnSaveVisible(haveAuthData);
|
set_pushButtonSaveVisible(haveAuthData);
|
||||||
set_progressBarProtoOpenVpnResetVisible(haveAuthData);
|
set_progressBarResetVisible(haveAuthData);
|
||||||
|
|
||||||
set_radioButtonProtoOpenVpnUdpEnabled(true);
|
set_radioButtonUdpEnabled(true);
|
||||||
set_radioButtonProtoOpenVpnTcpEnabled(true);
|
set_radioButtonTcpEnabled(true);
|
||||||
|
|
||||||
set_lineEditProtoOpenVpnSubnetText(openvpnConfig.value(config_key::subnet_address).
|
set_lineEditSubnetText(openvpnConfig.value(config_key::subnet_address).
|
||||||
toString(protocols::openvpn::defaultSubnetAddress));
|
toString(protocols::openvpn::defaultSubnetAddress));
|
||||||
|
|
||||||
QString trasnsport = openvpnConfig.value(config_key::transport_proto).
|
QString trasnsport = openvpnConfig.value(config_key::transport_proto).
|
||||||
toString(protocols::openvpn::defaultTransportProto);
|
toString(protocols::openvpn::defaultTransportProto);
|
||||||
|
|
||||||
set_radioButtonProtoOpenVpnUdpChecked(trasnsport == protocols::openvpn::defaultTransportProto);
|
set_radioButtonUdpChecked(trasnsport == protocols::openvpn::defaultTransportProto);
|
||||||
set_radioButtonProtoOpenVpnTcpChecked(trasnsport != protocols::openvpn::defaultTransportProto);
|
set_radioButtonTcpChecked(trasnsport != protocols::openvpn::defaultTransportProto);
|
||||||
|
|
||||||
set_comboBoxProtoOpenVpnCipherText(openvpnConfig.value(config_key::cipher).
|
set_comboBoxVpnCipherText(openvpnConfig.value(config_key::cipher).
|
||||||
toString(protocols::openvpn::defaultCipher));
|
toString(protocols::openvpn::defaultCipher));
|
||||||
|
|
||||||
set_comboBoxProtoOpenVpnHashText(openvpnConfig.value(config_key::hash).
|
set_comboBoxVpnHashText(openvpnConfig.value(config_key::hash).
|
||||||
toString(protocols::openvpn::defaultHash));
|
toString(protocols::openvpn::defaultHash));
|
||||||
|
|
||||||
bool blockOutsideDns = openvpnConfig.value(config_key::block_outside_dns).toBool(protocols::openvpn::defaultBlockOutsideDns);
|
bool blockOutsideDns = openvpnConfig.value(config_key::block_outside_dns).toBool(protocols::openvpn::defaultBlockOutsideDns);
|
||||||
set_checkBoxProtoOpenVpnBlockDnsChecked(blockOutsideDns);
|
set_checkBoxBlockDnsChecked(blockOutsideDns);
|
||||||
|
|
||||||
bool isNcpDisabled = openvpnConfig.value(config_key::ncp_disable).toBool(protocols::openvpn::defaultNcpDisable);
|
bool isNcpDisabled = openvpnConfig.value(config_key::ncp_disable).toBool(protocols::openvpn::defaultNcpDisable);
|
||||||
set_checkBoxProtoOpenVpnAutoEncryptionChecked(!isNcpDisabled);
|
set_checkBoxAutoEncryptionChecked(!isNcpDisabled);
|
||||||
|
|
||||||
bool isTlsAuth = openvpnConfig.value(config_key::tls_auth).toBool(protocols::openvpn::defaultTlsAuth);
|
bool isTlsAuth = openvpnConfig.value(config_key::tls_auth).toBool(protocols::openvpn::defaultTlsAuth);
|
||||||
set_checkBoxProtoOpenVpnTlsAuthChecked(isTlsAuth);
|
set_checkBoxTlsAuthChecked(isTlsAuth);
|
||||||
|
|
||||||
if (container == DockerContainer::ShadowSocks) {
|
if (container == DockerContainer::ShadowSocks) {
|
||||||
set_radioButtonProtoOpenVpnUdpEnabled(false);
|
set_radioButtonUdpEnabled(false);
|
||||||
set_radioButtonProtoOpenVpnTcpEnabled(false);
|
set_radioButtonTcpEnabled(false);
|
||||||
set_radioButtonProtoOpenVpnTcpChecked(true);
|
set_radioButtonTcpChecked(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_lineEditProtoOpenVpnPortText(openvpnConfig.value(config_key::port).
|
set_lineEditPortText(openvpnConfig.value(config_key::port).
|
||||||
toString(protocols::openvpn::defaultPort));
|
toString(protocols::openvpn::defaultPort));
|
||||||
|
|
||||||
set_lineEditProtoOpenVpnPortEnabled(container == DockerContainer::OpenVpn);
|
set_lineEditPortEnabled(container == DockerContainer::OpenVpn);
|
||||||
}
|
|
||||||
|
|
||||||
void OpenVpnLogic::onCheckBoxProtoOpenVpnAutoEncryptionClicked()
|
|
||||||
{
|
|
||||||
set_comboBoxProtoOpenVpnCipherEnabled(!checkBoxProtoOpenVpnAutoEncryptionChecked());
|
|
||||||
set_comboBoxProtoOpenVpnHashEnabled(!checkBoxProtoOpenVpnAutoEncryptionChecked());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenVpnLogic::onPushButtonProtoOpenVpnSaveClicked()
|
void OpenVpnLogic::onPushButtonProtoOpenVpnSaveClicked()
|
||||||
|
|
@ -102,7 +94,7 @@ void OpenVpnLogic::onPushButtonProtoOpenVpnSaveClicked()
|
||||||
};
|
};
|
||||||
UiLogic::ButtonFunc pushButton_proto_openvpn_save;
|
UiLogic::ButtonFunc pushButton_proto_openvpn_save;
|
||||||
pushButton_proto_openvpn_save.setVisibleFunc = [this] (bool visible) ->void {
|
pushButton_proto_openvpn_save.setVisibleFunc = [this] (bool visible) ->void {
|
||||||
set_pushButtonOpenvpnSaveVisible(visible);
|
set_pushButtonSaveVisible(visible);
|
||||||
};
|
};
|
||||||
UiLogic::LabelFunc label_proto_openvpn_info;
|
UiLogic::LabelFunc label_proto_openvpn_info;
|
||||||
label_proto_openvpn_info.setVisibleFunc = [this] (bool visible) ->void {
|
label_proto_openvpn_info.setVisibleFunc = [this] (bool visible) ->void {
|
||||||
|
|
@ -113,16 +105,16 @@ void OpenVpnLogic::onPushButtonProtoOpenVpnSaveClicked()
|
||||||
};
|
};
|
||||||
UiLogic::ProgressFunc progressBar_proto_openvpn_reset;
|
UiLogic::ProgressFunc progressBar_proto_openvpn_reset;
|
||||||
progressBar_proto_openvpn_reset.setVisibleFunc = [this] (bool visible) ->void {
|
progressBar_proto_openvpn_reset.setVisibleFunc = [this] (bool visible) ->void {
|
||||||
set_progressBarProtoOpenVpnResetVisible(visible);
|
set_progressBarResetVisible(visible);
|
||||||
};
|
};
|
||||||
progressBar_proto_openvpn_reset.setValueFunc = [this] (int value) ->void {
|
progressBar_proto_openvpn_reset.setValueFunc = [this] (int value) ->void {
|
||||||
set_progressBarProtoOpenVpnResetValue(value);
|
set_progressBarResetValue(value);
|
||||||
};
|
};
|
||||||
progressBar_proto_openvpn_reset.getValueFunc = [this] (void) -> int {
|
progressBar_proto_openvpn_reset.getValueFunc = [this] (void) -> int {
|
||||||
return progressBarProtoOpenVpnResetValue();
|
return progressBarResetValue();
|
||||||
};
|
};
|
||||||
progressBar_proto_openvpn_reset.getMaximiumFunc = [this] (void) -> int {
|
progressBar_proto_openvpn_reset.getMaximiumFunc = [this] (void) -> int {
|
||||||
return progressBarProtoOpenVpnResetMaximium();
|
return progressBarResetMaximium();
|
||||||
};
|
};
|
||||||
|
|
||||||
ErrorCode e = uiLogic()->doInstallAction([this, containerConfig, &newContainerConfig](){
|
ErrorCode e = uiLogic()->doInstallAction([this, containerConfig, &newContainerConfig](){
|
||||||
|
|
@ -140,13 +132,13 @@ void OpenVpnLogic::onPushButtonProtoOpenVpnSaveClicked()
|
||||||
|
|
||||||
QJsonObject OpenVpnLogic::getProtocolConfigFromPage(QJsonObject oldConfig)
|
QJsonObject OpenVpnLogic::getProtocolConfigFromPage(QJsonObject oldConfig)
|
||||||
{
|
{
|
||||||
oldConfig.insert(config_key::subnet_address, lineEditProtoOpenVpnSubnetText());
|
oldConfig.insert(config_key::subnet_address, lineEditSubnetText());
|
||||||
oldConfig.insert(config_key::transport_proto, radioButtonProtoOpenVpnUdpChecked() ? protocols::UDP : protocols::TCP);
|
oldConfig.insert(config_key::transport_proto, radioButtonUdpChecked() ? protocols::UDP : protocols::TCP);
|
||||||
oldConfig.insert(config_key::ncp_disable, ! checkBoxProtoOpenVpnAutoEncryptionChecked());
|
oldConfig.insert(config_key::ncp_disable, ! checkBoxAutoEncryptionChecked());
|
||||||
oldConfig.insert(config_key::cipher, comboBoxProtoOpenVpnCipherText());
|
oldConfig.insert(config_key::cipher, comboBoxVpnCipherText());
|
||||||
oldConfig.insert(config_key::hash, comboBoxProtoOpenVpnHashText());
|
oldConfig.insert(config_key::hash, comboBoxVpnHashText());
|
||||||
oldConfig.insert(config_key::block_outside_dns, checkBoxProtoOpenVpnBlockDnsChecked());
|
oldConfig.insert(config_key::block_outside_dns, checkBoxBlockDnsChecked());
|
||||||
oldConfig.insert(config_key::port, lineEditProtoOpenVpnPortText());
|
oldConfig.insert(config_key::port, lineEditPortText());
|
||||||
oldConfig.insert(config_key::tls_auth, checkBoxProtoOpenVpnTlsAuthChecked());
|
oldConfig.insert(config_key::tls_auth, checkBoxTlsAuthChecked());
|
||||||
return oldConfig;
|
return oldConfig;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,34 +9,31 @@ class OpenVpnLogic : public PageProtocolLogicBase
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
AUTO_PROPERTY(QString, lineEditProtoOpenVpnSubnetText)
|
AUTO_PROPERTY(QString, lineEditSubnetText)
|
||||||
|
|
||||||
AUTO_PROPERTY(bool, radioButtonProtoOpenVpnTcpEnabled)
|
AUTO_PROPERTY(bool, radioButtonTcpEnabled)
|
||||||
AUTO_PROPERTY(bool, radioButtonProtoOpenVpnUdpEnabled)
|
AUTO_PROPERTY(bool, radioButtonUdpEnabled)
|
||||||
AUTO_PROPERTY(bool, radioButtonProtoOpenVpnTcpChecked)
|
AUTO_PROPERTY(bool, radioButtonTcpChecked)
|
||||||
AUTO_PROPERTY(bool, radioButtonProtoOpenVpnUdpChecked)
|
AUTO_PROPERTY(bool, radioButtonUdpChecked)
|
||||||
|
|
||||||
AUTO_PROPERTY(bool, checkBoxProtoOpenVpnAutoEncryptionChecked)
|
AUTO_PROPERTY(bool, checkBoxAutoEncryptionChecked)
|
||||||
AUTO_PROPERTY(QString, comboBoxProtoOpenVpnCipherText)
|
AUTO_PROPERTY(QString, comboBoxVpnCipherText)
|
||||||
AUTO_PROPERTY(QString, comboBoxProtoOpenVpnHashText)
|
AUTO_PROPERTY(QString, comboBoxVpnHashText)
|
||||||
AUTO_PROPERTY(bool, checkBoxProtoOpenVpnBlockDnsChecked)
|
AUTO_PROPERTY(bool, checkBoxBlockDnsChecked)
|
||||||
AUTO_PROPERTY(QString, lineEditProtoOpenVpnPortText)
|
AUTO_PROPERTY(QString, lineEditPortText)
|
||||||
AUTO_PROPERTY(bool, checkBoxProtoOpenVpnTlsAuthChecked)
|
AUTO_PROPERTY(bool, checkBoxTlsAuthChecked)
|
||||||
|
|
||||||
AUTO_PROPERTY(bool, pushButtonOpenvpnSaveVisible)
|
AUTO_PROPERTY(bool, pushButtonSaveVisible)
|
||||||
AUTO_PROPERTY(bool, progressBarProtoOpenVpnResetVisible)
|
AUTO_PROPERTY(bool, progressBarResetVisible)
|
||||||
|
|
||||||
AUTO_PROPERTY(bool, lineEditProtoOpenVpnPortEnabled)
|
AUTO_PROPERTY(bool, lineEditPortEnabled)
|
||||||
|
|
||||||
AUTO_PROPERTY(bool, comboBoxProtoOpenVpnCipherEnabled)
|
|
||||||
AUTO_PROPERTY(bool, comboBoxProtoOpenVpnHashEnabled)
|
|
||||||
AUTO_PROPERTY(bool, labelProtoOpenVpnInfoVisible)
|
AUTO_PROPERTY(bool, labelProtoOpenVpnInfoVisible)
|
||||||
AUTO_PROPERTY(QString, labelProtoOpenVpnInfoText)
|
AUTO_PROPERTY(QString, labelProtoOpenVpnInfoText)
|
||||||
AUTO_PROPERTY(int, progressBarProtoOpenVpnResetValue)
|
AUTO_PROPERTY(int, progressBarResetValue)
|
||||||
AUTO_PROPERTY(int, progressBarProtoOpenVpnResetMaximium)
|
AUTO_PROPERTY(int, progressBarResetMaximium)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Q_INVOKABLE void onCheckBoxProtoOpenVpnAutoEncryptionClicked();
|
|
||||||
Q_INVOKABLE void onPushButtonProtoOpenVpnSaveClicked();
|
Q_INVOKABLE void onPushButtonProtoOpenVpnSaveClicked();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,9 @@ PageProtocolBase {
|
||||||
|
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
height: 31
|
height: 31
|
||||||
text: logic.lineEditProtoOpenVpnSubnetText
|
text: logic.lineEditSubnetText
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
logic.lineEditProtoOpenVpnSubnetText = text
|
logic.lineEditSubnetText = text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,10 +78,10 @@ PageProtocolBase {
|
||||||
width: 171
|
width: 171
|
||||||
height: 19
|
height: 19
|
||||||
text: qsTr("TCP")
|
text: qsTr("TCP")
|
||||||
enabled: logic.radioButtonProtoOpenVpnTcpEnabled
|
enabled: logic.radioButtonTcpEnabled
|
||||||
checked: logic.radioButtonProtoOpenVpnTcpChecked
|
checked: logic.radioButtonTcpChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
UiLogic.radioButtonProtoOpenVpnTcpChecked = checked
|
UiLogic.radioButtonTcpChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RadioButtonType {
|
RadioButtonType {
|
||||||
|
|
@ -90,11 +90,11 @@ PageProtocolBase {
|
||||||
width: 171
|
width: 171
|
||||||
height: 19
|
height: 19
|
||||||
text: qsTr("UDP")
|
text: qsTr("UDP")
|
||||||
checked: logic.radioButtonProtoOpenVpnUdpChecked
|
checked: logic.radioButtonUdpChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
logic.radioButtonProtoOpenVpnUdpChecked = checked
|
logic.radioButtonUdpChecked = checked
|
||||||
}
|
}
|
||||||
enabled: logic.radioButtonProtoOpenVpnUdpEnabled
|
enabled: logic.radioButtonUdpEnabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,11 +113,11 @@ PageProtocolBase {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
height: 31
|
height: 31
|
||||||
text: logic.lineEditProtoOpenVpnPortText
|
text: logic.lineEditPortText
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
logic.lineEditProtoOpenVpnPortText = text
|
logic.lineEditPortText = text
|
||||||
}
|
}
|
||||||
enabled: logic.lineEditProtoOpenVpnPortEnabled
|
enabled: logic.lineEditPortEnabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -130,12 +130,12 @@ PageProtocolBase {
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
height: 21
|
height: 21
|
||||||
text: qsTr("Auto-negotiate encryption")
|
text: qsTr("Auto-negotiate encryption")
|
||||||
checked: logic.checkBoxProtoOpenVpnAutoEncryptionChecked
|
checked: logic.checkBoxAutoEncryptionChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
logic.checkBoxProtoOpenVpnAutoEncryptionChecked = checked
|
logic.checkBoxAutoEncryptionChecked = checked
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
logic.checkBoxProtoOpenVpnAutoEncryptionClicked()
|
logic.checkBoxAutoEncryptionClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -165,16 +165,16 @@ PageProtocolBase {
|
||||||
]
|
]
|
||||||
currentIndex: {
|
currentIndex: {
|
||||||
for (let i = 0; i < model.length; ++i) {
|
for (let i = 0; i < model.length; ++i) {
|
||||||
if (logic.comboBoxProtoOpenVpnCipherText === model[i]) {
|
if (logic.comboBoxVpnCipherText === model[i]) {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
onCurrentTextChanged: {
|
onCurrentTextChanged: {
|
||||||
logic.comboBoxProtoOpenVpnCipherText = currentText
|
logic.comboBoxVpnCipherText = currentText
|
||||||
}
|
}
|
||||||
enabled: logic.comboBoxProtoOpenVpnCipherEnabled
|
enabled: !check_auto_enc.checked
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -202,16 +202,16 @@ PageProtocolBase {
|
||||||
]
|
]
|
||||||
currentIndex: {
|
currentIndex: {
|
||||||
for (let i = 0; i < model.length; ++i) {
|
for (let i = 0; i < model.length; ++i) {
|
||||||
if (logic.comboBoxProtoOpenVpnHashText === model[i]) {
|
if (logic.comboBoxVpnHashText === model[i]) {
|
||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
onCurrentTextChanged: {
|
onCurrentTextChanged: {
|
||||||
logic.comboBoxProtoOpenVpnHashText = currentText
|
logic.comboBoxVpnHashText = currentText
|
||||||
}
|
}
|
||||||
enabled: logic.comboBoxProtoOpenVpnHashEnabled
|
enabled: !check_auto_enc.checked
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckBoxType {
|
CheckBoxType {
|
||||||
|
|
@ -220,9 +220,9 @@ PageProtocolBase {
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
height: 21
|
height: 21
|
||||||
text: qsTr("Enable TLS auth")
|
text: qsTr("Enable TLS auth")
|
||||||
checked: logic.checkBoxProtoOpenVpnTlsAuthChecked
|
checked: logic.checkBoxTlsAuthChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
logic.checkBoxProtoOpenVpnTlsAuthChecked = checked
|
logic.checkBoxTlsAuthChecked = checked
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -232,9 +232,9 @@ PageProtocolBase {
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
height: 21
|
height: 21
|
||||||
text: qsTr("Block DNS requests outside of VPN")
|
text: qsTr("Block DNS requests outside of VPN")
|
||||||
checked: logic.checkBoxProtoOpenVpnBlockDnsChecked
|
checked: logic.checkBoxBlockDnsChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
logic.checkBoxProtoOpenVpnBlockDnsChecked = checked
|
logic.checkBoxBlockDnsChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -363,7 +363,7 @@ PageProtocolBase {
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Save and restart VPN")
|
text: qsTr("Save and restart VPN")
|
||||||
width: parent.width
|
width: parent.width
|
||||||
visible: logic.pushButtonOpenvpnSaveVisible
|
visible: logic.pushButtonSaveVisible
|
||||||
onClicked: {
|
onClicked: {
|
||||||
logic.onPushButtonProtoOpenVpnSaveClicked()
|
logic.onPushButtonProtoOpenVpnSaveClicked()
|
||||||
}
|
}
|
||||||
|
|
@ -373,9 +373,9 @@ PageProtocolBase {
|
||||||
id: progress_save
|
id: progress_save
|
||||||
anchors.fill: pb_save
|
anchors.fill: pb_save
|
||||||
from: 0
|
from: 0
|
||||||
to: logic.progressBarProtoOpenVpnResetMaximium
|
to: logic.progressBarResetMaximium
|
||||||
value: logic.progressBarProtoOpenVpnResetValue
|
value: logic.progressBarResetValue
|
||||||
visible: logic.progressBarProtoOpenVpnResetVisible
|
visible: logic.progressBarResetVisible
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue