added display of vpn containers and services on the settings page
- added PageSettingsData and implementation of 'remove all containers' button
This commit is contained in:
parent
e00656d757
commit
1e180489a4
19 changed files with 393 additions and 102 deletions
|
|
@ -5,6 +5,7 @@ import QtQuick.Layouts
|
|||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
import ProtocolProps 1.0
|
||||
|
||||
|
|
@ -12,6 +13,7 @@ import "./"
|
|||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Config"
|
||||
import "../Components"
|
||||
|
||||
PageType {
|
||||
id: root
|
||||
|
|
@ -27,35 +29,28 @@ PageType {
|
|||
]
|
||||
}
|
||||
|
||||
FlickableType {
|
||||
id: fl
|
||||
anchors.fill: parent
|
||||
contentHeight: content.height
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.fill: parent
|
||||
|
||||
spacing: 16
|
||||
|
||||
Repeater {
|
||||
id: header
|
||||
model: proxyServersModel
|
||||
|
||||
delegate: HeaderType {
|
||||
id: header
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
Layout.leftMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
|
||||
actionButtonImage: "qrc:/images/controls/plus.svg"
|
||||
actionButtonImage: "qrc:/images/controls/edit-3.svg"
|
||||
backButtonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
headerText: name
|
||||
descriptionText: hostName
|
||||
|
||||
actionButtonFunction: function() {
|
||||
connectionTypeSelection.visible = true
|
||||
|
|
@ -66,6 +61,82 @@ PageType {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
TabBar {
|
||||
id: tabBar
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
TabButtonType {
|
||||
isSelected: tabBar.currentIndex === 0
|
||||
text: qsTr("Protocols")
|
||||
}
|
||||
TabButtonType {
|
||||
isSelected: tabBar.currentIndex === 1
|
||||
text: qsTr("Services")
|
||||
}
|
||||
TabButtonType {
|
||||
isSelected: tabBar.currentIndex === 2
|
||||
text: qsTr("Data")
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
id: stackLayout
|
||||
currentIndex: tabBar.currentIndex
|
||||
|
||||
Layout.fillWidth: true
|
||||
height: root.height
|
||||
|
||||
StackView {
|
||||
id: protocolsStackView
|
||||
initialItem: PageSettingsContainersListView {
|
||||
model: SortFilterProxyModel {
|
||||
sourceModel: ContainersModel
|
||||
filters: [
|
||||
ValueFilter {
|
||||
roleName: "serviceType"
|
||||
value: ProtocolEnum.Vpn
|
||||
},
|
||||
ValueFilter {
|
||||
roleName: "isSupported"
|
||||
value: true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: servicesStackView
|
||||
initialItem: PageSettingsContainersListView {
|
||||
model: SortFilterProxyModel {
|
||||
sourceModel: ContainersModel
|
||||
filters: [
|
||||
ValueFilter {
|
||||
roleName: "serviceType"
|
||||
value: ProtocolEnum.Other
|
||||
},
|
||||
ValueFilter {
|
||||
roleName: "isSupported"
|
||||
value: true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StackView {
|
||||
id: dataStackView
|
||||
initialItem: PageSettingsData {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue