From f5301e1315ade3b99e2648c60d68535beb1f1ed1 Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Mon, 1 Apr 2024 17:07:33 +0500 Subject: [PATCH] added app split tunneling on home page --- client/ui/qml/Components/HomeSplitTunnelingDrawer.qml | 8 ++++++-- client/ui/qml/Pages2/PageHome.qml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/ui/qml/Components/HomeSplitTunnelingDrawer.qml b/client/ui/qml/Components/HomeSplitTunnelingDrawer.qml index 9cc1983e..a5da60c7 100644 --- a/client/ui/qml/Components/HomeSplitTunnelingDrawer.qml +++ b/client/ui/qml/Components/HomeSplitTunnelingDrawer.qml @@ -11,6 +11,8 @@ import "../Config" DrawerType2 { id: root + property bool isAppSplitTinnelingEnabled: Qt.platform.os === "windows" || Qt.platform.os === "android" + anchors.fill: parent expandedHeight: parent.height * 0.7 @@ -73,10 +75,12 @@ DrawerType2 { } LabelWithButtonType { + visible: isAppSplitTinnelingEnabled + Layout.fillWidth: true - visible: false text: qsTr("App-based split tunneling") + descriptionText: AppSplitTunnelingModel.isTunnelingEnabled ? qsTr("Enabled") : qsTr("Disabled") rightImageSource: "qrc:/images/controls/chevron-right.svg" clickedFunction: function() { @@ -86,7 +90,7 @@ DrawerType2 { } DividerType { - visible: false + visible: isAppSplitTinnelingEnabled } } } diff --git a/client/ui/qml/Pages2/PageHome.qml b/client/ui/qml/Pages2/PageHome.qml index 32cf8f4f..ce8b6e7a 100644 --- a/client/ui/qml/Pages2/PageHome.qml +++ b/client/ui/qml/Pages2/PageHome.qml @@ -82,7 +82,7 @@ PageType { leftImageColor: "transparent" borderWidth: 0 - property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || + property bool isSplitTunnelingEnabled: SitesModel.isTunnelingEnabled || AppSplitTunnelingModel.isTunnelingEnabled || (ServersModel.isDefaultServerDefaultContainerHasSplitTunneling && ServersModel.getDefaultServerData("isServerFromApi")) text: isSplitTunnelingEnabled ? qsTr("Split tunneling enabled") : qsTr("Split tunneling disabled")