2024-02-21 18:27:27 +07:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
|
|
|
|
import PageEnum 1.0
|
|
|
|
|
|
|
|
|
|
import "../Controls2"
|
|
|
|
|
import "../Controls2/TextTypes"
|
|
|
|
|
import "../Config"
|
|
|
|
|
|
|
|
|
|
DrawerType2 {
|
|
|
|
|
id: root
|
|
|
|
|
|
2024-04-01 17:07:33 +05:00
|
|
|
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
|
|
|
|
|
|
2024-02-21 18:27:27 +07:00
|
|
|
anchors.fill: parent
|
2024-07-11 16:36:24 +07:00
|
|
|
expandedHeight: parent.height * 0.9
|
2024-02-21 18:27:27 +07:00
|
|
|
|
2024-12-31 04:16:52 +01:00
|
|
|
expandedStateContent: ColumnLayout {
|
2024-02-21 18:27:27 +07:00
|
|
|
id: content
|
|
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
|
|
Header2Type {
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 24
|
|
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
Layout.leftMargin: 16
|
|
|
|
|
Layout.bottomMargin: 16
|
|
|
|
|
|
|
|
|
|
headerText: qsTr("Split tunneling")
|
|
|
|
|
descriptionText: qsTr("Allows you to connect to some sites or applications through a VPN connection and bypass others")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: splitTunnelingSwitch
|
2024-02-21 18:27:27 +07:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 16
|
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
visible: ServersModel.isDefaultServerDefaultContainerHasSplitTunneling
|
2024-02-21 18:27:27 +07:00
|
|
|
|
|
|
|
|
text: qsTr("Split tunneling on the server")
|
|
|
|
|
descriptionText: qsTr("Enabled \nCan't be disabled for current server")
|
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
2024-12-31 04:16:52 +01:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
|
|
|
|
|
root.closeTriggered()
|
2024-02-21 18:27:27 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DividerType {
|
2024-08-20 16:54:05 +07:00
|
|
|
visible: ServersModel.isDefaultServerDefaultContainerHasSplitTunneling
|
2024-02-21 18:27:27 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: siteBasedSplitTunnelingSwitch
|
2024-02-21 18:27:27 +07:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
Layout.topMargin: 16
|
|
|
|
|
|
|
|
|
|
text: qsTr("Site-based split tunneling")
|
|
|
|
|
descriptionText: enabled && SitesModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
|
|
|
|
PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
|
2024-12-31 04:16:52 +01:00
|
|
|
root.closeTriggered()
|
2024-02-21 18:27:27 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DividerType {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
2024-04-18 17:54:55 +04:00
|
|
|
id: appSplitTunnelingSwitch
|
2024-04-01 17:07:33 +05:00
|
|
|
visible: isAppSplitTinnelingEnabled
|
|
|
|
|
|
2024-02-21 18:27:27 +07:00
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
text: qsTr("App-based split tunneling")
|
2024-04-01 17:07:33 +05:00
|
|
|
descriptionText: AppSplitTunnelingModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
|
2024-02-21 18:27:27 +07:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
2024-04-01 18:45:00 +07:00
|
|
|
PageController.goToPage(PageEnum.PageSettingsAppSplitTunneling)
|
2024-12-31 04:16:52 +01:00
|
|
|
root.closeTriggered()
|
2024-02-21 18:27:27 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DividerType {
|
2024-04-01 17:07:33 +05:00
|
|
|
visible: isAppSplitTinnelingEnabled
|
2024-02-21 18:27:27 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|