added PageSettings and PageSettingsServersList.
- replaced PageLoader with PageType with stackView property. - added error handling when installing a server/container
This commit is contained in:
parent
ca6b7fbeb2
commit
e00656d757
31 changed files with 486 additions and 142 deletions
111
client/ui/qml/Pages2/PageSettingsServersList.qml
Normal file
111
client/ui/qml/Pages2/PageSettingsServersList.qml
Normal file
|
@ -0,0 +1,111 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import PageEnum 1.0
|
||||
import ProtocolEnum 1.0
|
||||
import ContainerProps 1.0
|
||||
|
||||
import "./"
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
import "../Config"
|
||||
import "../Components"
|
||||
|
||||
PageType {
|
||||
id: root
|
||||
|
||||
HeaderType {
|
||||
id: header
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
anchors.topMargin: 20
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
actionButtonImage: "qrc:/images/controls/plus.svg"
|
||||
backButtonImage: "qrc:/images/controls/arrow-left.svg"
|
||||
|
||||
headerText: "Серверы"
|
||||
|
||||
actionButtonFunction: function() {
|
||||
connectionTypeSelection.visible = true
|
||||
}
|
||||
|
||||
backButtonFunction: function() {
|
||||
PageController.goToPageHome()
|
||||
}
|
||||
}
|
||||
|
||||
ConnectionTypeSelectionDrawer {
|
||||
id: connectionTypeSelection
|
||||
}
|
||||
|
||||
FlickableType {
|
||||
anchors.top: header.bottom
|
||||
anchors.topMargin: 16
|
||||
contentHeight: col.implicitHeight
|
||||
|
||||
Column {
|
||||
id: col
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
anchors.leftMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
|
||||
spacing: 16
|
||||
|
||||
ListView {
|
||||
id: servers
|
||||
width: parent.width
|
||||
height: servers.contentItem.height
|
||||
|
||||
model: ServersModel
|
||||
|
||||
clip: true
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: servers.width
|
||||
implicitHeight: delegateContent.implicitHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: delegateContent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
LabelWithButtonType {
|
||||
id: server
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.bottomMargin: 16
|
||||
|
||||
text: name
|
||||
descriptionText: hostName
|
||||
buttonImage: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
ServersModel.setCurrentlyProcessedServerIndex(index)
|
||||
goToPage(PageEnum.PageSettings)
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
color: "#2C2D30"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue