added app split tunneling on home page

This commit is contained in:
vladimir.kuznetsov 2024-04-01 17:07:33 +05:00
parent adab30fc81
commit f5301e1315
2 changed files with 7 additions and 3 deletions

View file

@ -11,6 +11,8 @@ import "../Config"
DrawerType2 { DrawerType2 {
id: root id: root
property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android"
anchors.fill: parent anchors.fill: parent
expandedHeight: parent.height * 0.7 expandedHeight: parent.height * 0.7
@ -73,10 +75,12 @@ DrawerType2 {
} }
LabelWithButtonType { LabelWithButtonType {
visible: isAppSplitTinnelingEnabled
Layout.fillWidth: true Layout.fillWidth: true
visible: false
text: qsTr("App-based split tunneling") text: qsTr("App-based split tunneling")
descriptionText: AppSplitTunnelingModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled")
rightImageSource: "qrc:/images/controls/chevron-right.svg" rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() { clickedFunction: function() {
@ -86,7 +90,7 @@ DrawerType2 {
} }
DividerType { DividerType {
visible: false visible: isAppSplitTinnelingEnabled
} }
} }
} }

View file

@ -82,7 +82,7 @@ PageType {
leftImageColor: "transparent" leftImageColor: "transparent"
borderWidth: 0 borderWidth: 0
property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || AppSplitTunnelingModel.isTunnelingEnabled ||
(ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi")) (ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi"))
text: isSplitTunnelingEnabled ? qsTr("Split tunneling enabled") : qsTr("Split tunneling disabled") text: isSplitTunnelingEnabled ? qsTr("Split tunneling enabled") : qsTr("Split tunneling disabled")