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
|
|
@ -37,12 +37,11 @@ Drawer {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
Header2TextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 24
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
text: "Данные для подключения"
|
||||
|
|
@ -52,7 +51,7 @@ Drawer {
|
|||
LabelWithButtonType {
|
||||
id: ip
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 32
|
||||
Layout.topMargin: 16
|
||||
|
||||
text: "IP, логин и пароль от сервера"
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
|
|
@ -62,11 +61,9 @@ Drawer {
|
|||
root.visible = false
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
color: "#2C2D30"
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
|
||||
LabelWithButtonType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
|
@ -78,10 +75,7 @@ Drawer {
|
|||
root.visible = false
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
color: "#2C2D30"
|
||||
}
|
||||
|
||||
DividerType {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,4 +116,3 @@ ListView {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
107
client/ui/qml/Components/PageSettingsContainersListView.qml
Normal file
107
client/ui/qml/Components/PageSettingsContainersListView.qml
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
|
||||
ListView {
|
||||
id: root
|
||||
|
||||
height: root.contentItem.height
|
||||
|
||||
clip: true
|
||||
|
||||
ButtonGroup {
|
||||
id: containersRadioButtonGroup
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: containerRadioButton.implicitHeight
|
||||
|
||||
RadioButton {
|
||||
id: containerRadioButton
|
||||
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: containerRadioButtonContent.implicitHeight
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
ButtonGroup.group: containersRadioButtonGroup
|
||||
|
||||
checked: isDefault
|
||||
|
||||
indicator: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: containerRadioButton.hovered ? Qt.rgba(1, 1, 1, 0.08) : "transparent"
|
||||
|
||||
Behavior on color {
|
||||
PropertyAnimation { duration: 200 }
|
||||
}
|
||||
}
|
||||
|
||||
checkable: isInstalled
|
||||
|
||||
RowLayout {
|
||||
id: containerRadioButtonContent
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
z: 1
|
||||
|
||||
ColumnLayout {
|
||||
Layout.topMargin: 20
|
||||
Layout.bottomMargin: 20
|
||||
|
||||
ListItemTitleType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: name
|
||||
}
|
||||
|
||||
CaptionTextType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: description
|
||||
color: "#878B91"
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
source: isInstalled ? "qrc:/images/controls/chevron-right.svg" : "qrc:/images/controls/download.svg"
|
||||
|
||||
width: 24
|
||||
height: 24
|
||||
|
||||
Layout.rightMargin: 8
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (isInstalled) {
|
||||
// isDefault = true
|
||||
// root.currentIndex = index
|
||||
} else {
|
||||
ContainersModel.setCurrentlyInstalledContainerIndex(root.model.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: containerRadioButton
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue