added PageSetupWizardViewConfig
- added a popup with a question when deleting containers/servers - added import from code and import error handling
This commit is contained in:
parent
de0cd976de
commit
420c33d3ba
37 changed files with 701 additions and 312 deletions
|
|
@ -13,7 +13,7 @@ Button {
|
|||
id: border
|
||||
|
||||
source: connectionProccess.running ? "/images/connectionProgress.svg" :
|
||||
ConnectionController.isConnected() ? "/images/connectionOff.svg" : "/images/connectionOn.svg"
|
||||
ConnectionController.isConnected ? "/images/connectionOff.svg" : "/images/connectionOn.svg"
|
||||
|
||||
RotationAnimator {
|
||||
id: connectionProccess
|
||||
|
|
@ -46,7 +46,7 @@ Button {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
ConnectionController.onConnectionButtonClicked()
|
||||
ConnectionController.isConnected ? ConnectionController.closeConnection() : ConnectionController.openConnection()
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
@ -61,6 +61,7 @@ Button {
|
|||
console.log("Disconnected")
|
||||
connectionProccess.running = false
|
||||
root.text = qsTr("Connect")
|
||||
ConnectionController.isConnected = false
|
||||
break
|
||||
}
|
||||
case ConnectionState.Preparing: {
|
||||
|
|
@ -78,7 +79,8 @@ Button {
|
|||
case ConnectionState.Connected: {
|
||||
console.log("Connected")
|
||||
connectionProccess.running = false
|
||||
root.text = qsTr("Connected")
|
||||
root.text = qsTr("Disconnect")
|
||||
ConnectionController.isConnected = true
|
||||
break
|
||||
}
|
||||
case ConnectionState.Disconnecting: {
|
||||
|
|
|
|||
|
|
@ -14,20 +14,6 @@ DrawerType {
|
|||
width: parent.width
|
||||
height: parent.height * 0.4375
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.bottomMargin: -radius
|
||||
radius: 16
|
||||
color: "#1C1D21"
|
||||
|
||||
border.color: "#2C2D30"
|
||||
border.width: 1
|
||||
}
|
||||
|
||||
Overlay.modal: Rectangle {
|
||||
color: Qt.rgba(14/255, 14/255, 17/255, 0.8)
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
|
|
|
|||
|
|
@ -27,44 +27,54 @@ ListView {
|
|||
|
||||
delegate: Item {
|
||||
implicitWidth: rootWidth
|
||||
implicitHeight: containerRadioButton.implicitHeight
|
||||
implicitHeight: content.implicitHeight
|
||||
|
||||
VerticalRadioButton {
|
||||
id: containerRadioButton
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
text: name
|
||||
descriptionText: description
|
||||
VerticalRadioButton {
|
||||
id: containerRadioButton
|
||||
|
||||
ButtonGroup.group: containersRadioButtonGroup
|
||||
Layout.fillWidth: true
|
||||
|
||||
imageSource: "qrc:/images/controls/download.svg"
|
||||
showImage: !isInstalled
|
||||
text: name
|
||||
descriptionText: description
|
||||
|
||||
checkable: isInstalled
|
||||
checked: isDefault
|
||||
ButtonGroup.group: containersRadioButtonGroup
|
||||
|
||||
onClicked: {
|
||||
if (checked) {
|
||||
isDefault = true
|
||||
menuContent.currentIndex = index
|
||||
containersDropDown.menuVisible = false
|
||||
} else {
|
||||
ContainersModel.setCurrentlyInstalledContainerIndex(proxyContainersModel.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
containersDropDown.menuVisible = false
|
||||
menu.visible = false
|
||||
imageSource: "qrc:/images/controls/download.svg"
|
||||
showImage: !isInstalled
|
||||
|
||||
checkable: isInstalled
|
||||
checked: isDefault
|
||||
|
||||
onClicked: {
|
||||
if (checked) {
|
||||
isDefault = true
|
||||
menuContent.currentIndex = index
|
||||
containersDropDown.menuVisible = false
|
||||
} else {
|
||||
ContainersModel.setCurrentlyInstalledContainerIndex(proxyContainersModel.mapToSource(index))
|
||||
InstallController.setShouldCreateServer(false)
|
||||
goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
||||
containersDropDown.menuVisible = false
|
||||
menu.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: containerRadioButton
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: containerRadioButton
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
enabled: false
|
||||
DividerType {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
77
client/ui/qml/Components/QuestionDrawer.qml
Normal file
77
client/ui/qml/Components/QuestionDrawer.qml
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
DrawerType {
|
||||
id: root
|
||||
|
||||
property string headerText
|
||||
property string descriptionText
|
||||
property string yesButtonText
|
||||
property string noButtonText
|
||||
|
||||
property var yesButtonFunction
|
||||
property var noButtonFunction
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.5
|
||||
|
||||
ColumnLayout {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
spacing: 8
|
||||
|
||||
Header2TextType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
text: headerText
|
||||
}
|
||||
|
||||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
|
||||
text: descriptionText
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
text: yesButtonText
|
||||
|
||||
onClicked: {
|
||||
if (yesButtonFunction && typeof yesButtonFunction === "function") {
|
||||
yesButtonFunction()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
pressedColor: Qt.rgba(1, 1, 1, 0.12)
|
||||
disabledColor: "#878B91"
|
||||
textColor: "#D7D8DB"
|
||||
borderWidth: 1
|
||||
|
||||
text: noButtonText
|
||||
|
||||
onClicked: {
|
||||
if (noButtonFunction && typeof noButtonFunction === "function") {
|
||||
noButtonFunction()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue