2023-04-14 19:31:10 +03:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
|
|
|
|
|
import PageEnum 1.0
|
|
|
|
|
import ProtocolEnum 1.0
|
|
|
|
|
|
|
|
|
|
import "./"
|
|
|
|
|
import "../Controls2"
|
|
|
|
|
import "../Config"
|
|
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
PageType {
|
2023-04-14 19:31:10 +03:00
|
|
|
id: root
|
|
|
|
|
|
|
|
|
|
SortFilterProxyModel {
|
2023-05-03 19:06:16 +03:00
|
|
|
id: proxyContainersModel
|
|
|
|
|
sourceModel: ContainersModel
|
2023-04-14 19:31:10 +03:00
|
|
|
filters: [
|
|
|
|
|
ValueFilter {
|
2023-05-22 00:10:51 +08:00
|
|
|
roleName: "serviceType"
|
2023-04-14 19:31:10 +03:00
|
|
|
value: ProtocolEnum.Vpn
|
2023-05-22 00:10:51 +08:00
|
|
|
},
|
|
|
|
|
ValueFilter {
|
|
|
|
|
roleName: "isSupported"
|
|
|
|
|
value: true
|
2023-04-14 19:31:10 +03:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-30 13:45:11 +09:00
|
|
|
ColumnLayout {
|
|
|
|
|
id: backButton
|
|
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
anchors.topMargin: 20
|
|
|
|
|
|
|
|
|
|
BackButtonType {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-14 19:31:10 +03:00
|
|
|
FlickableType {
|
|
|
|
|
id: fl
|
2023-06-30 13:45:11 +09:00
|
|
|
anchors.top: backButton.top
|
2023-06-20 10:25:24 +09:00
|
|
|
anchors.bottom: parent.bottom
|
2023-06-30 13:45:11 +09:00
|
|
|
contentHeight: content.implicitHeight + content.anchors.topMargin + content.anchors.bottomMargin
|
2023-04-14 19:31:10 +03:00
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
id: content
|
|
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2023-06-30 13:45:11 +09:00
|
|
|
anchors.bottomMargin: 20
|
2023-06-05 15:49:10 +08:00
|
|
|
|
2023-06-30 10:40:43 +09:00
|
|
|
Item {
|
2023-04-14 19:31:10 +03:00
|
|
|
width: parent.width
|
2023-06-30 10:40:43 +09:00
|
|
|
height: header.implicitHeight
|
2023-04-14 19:31:10 +03:00
|
|
|
|
2023-06-30 10:40:43 +09:00
|
|
|
HeaderType {
|
|
|
|
|
id: header
|
|
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
anchors.leftMargin: 16
|
|
|
|
|
anchors.rightMargin: 16
|
|
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
|
|
headerText: "Протокол подключения"
|
|
|
|
|
descriptionText: "Выберите более приоритетный для вас. Позже можно будет установить остальные протоколы и доп сервисы, вроде DNS-прокси и SFTP."
|
|
|
|
|
}
|
2023-04-14 19:31:10 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
|
id: containers
|
|
|
|
|
width: parent.width
|
|
|
|
|
height: containers.contentItem.height
|
|
|
|
|
currentIndex: -1
|
|
|
|
|
clip: true
|
|
|
|
|
interactive: false
|
2023-05-03 19:06:16 +03:00
|
|
|
model: proxyContainersModel
|
2023-04-14 19:31:10 +03:00
|
|
|
|
|
|
|
|
delegate: Item {
|
|
|
|
|
implicitWidth: containers.width
|
|
|
|
|
implicitHeight: delegateContent.implicitHeight
|
|
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
|
id: delegateContent
|
|
|
|
|
|
|
|
|
|
anchors.top: parent.top
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
id: container
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
2023-05-22 00:10:51 +08:00
|
|
|
text: name
|
|
|
|
|
descriptionText: description
|
2023-06-20 10:25:24 +09:00
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
2023-04-14 19:31:10 +03:00
|
|
|
|
2023-05-25 15:40:17 +08:00
|
|
|
clickedFunction: function() {
|
2023-06-13 20:03:20 +09:00
|
|
|
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
|
2023-05-25 15:40:17 +08:00
|
|
|
goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
2023-05-03 19:06:16 +03:00
|
|
|
}
|
2023-04-14 19:31:10 +03:00
|
|
|
}
|
|
|
|
|
|
2023-05-27 22:46:41 +08:00
|
|
|
DividerType {}
|
2023-04-14 19:31:10 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|