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:
vladimir.kuznetsov 2023-06-05 15:49:10 +08:00
parent de0cd976de
commit 420c33d3ba
37 changed files with 701 additions and 312 deletions

View file

@ -0,0 +1,55 @@
import QtQuick
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
Item {
id: root
property string backButtonImage: "qrc:/images/controls/arrow-left.svg"
property var backButtonFunction
implicitWidth: content.implicitWidth
implicitHeight: content.implicitHeight
RowLayout {
id: content
anchors.fill: parent
ImageButtonType {
image: backButtonImage
imageColor: "#D7D8DB"
onClicked: {
if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction()
} else {
closePage()
}
}
}
Rectangle {
id: background
Layout.fillWidth: true
color: "transparent"
ShaderEffectSource {
id: effectSource
sourceItem: background
anchors.fill: background
sourceRect: Qt.rect(x,y, width, height)
}
FastBlur {
id: blur
anchors.fill: effectSource
source: effectSource
radius: 100
}
}
}
}

View file

@ -17,4 +17,18 @@ Drawer {
velocity: 4
}
}
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)
}
}

View file

@ -117,28 +117,9 @@ Item {
width: parent.width
height: parent.height * 0.9
background: Rectangle {
anchors.fill: parent
anchors.bottomMargin: -radius
radius: 16
color: "#1C1D21"
border.color: "#494B50"
border.width: 1
}
Overlay.modal: Rectangle {
color: Qt.rgba(14/255, 14/255, 17/255, 0.8)
}
Header2Type {
ColumnLayout {
id: header
headerText: root.headerText
backButtonImage: root.headerBackButtonImage
width: parent.width
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
@ -146,8 +127,11 @@ Item {
anchors.leftMargin: 16
anchors.rightMargin: 16
backButtonFunction: function() {
root.menuVisible = false
BackButtonType {
backButtonImage: root.headerBackButtonImage
backButtonFunction: function() {
root.menuVisible = false
}
}
}
@ -164,6 +148,17 @@ Item {
spacing: 16
Header2Type {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
anchors.rightMargin: 16
headerText: root.headerText
width: parent.width
}
Loader {
id: listViewLoader
sourceComponent: root.listView

View file

@ -6,10 +6,7 @@ import "TextTypes"
Item {
id: root
property string backButtonImage
property string actionButtonImage
property var backButtonFunction
property var actionButtonFunction
property string headerText
@ -22,25 +19,6 @@ Item {
id: content
anchors.fill: parent
ImageButtonType {
id: backButton
Layout.leftMargin: -6
image: root.backButtonImage
imageColor: "#D7D8DB"
visible: image ? true : false
onClicked: {
if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction()
} else {
closePage()
}
}
}
RowLayout {
Header2TextType {
id: header

View file

@ -6,10 +6,7 @@ import "TextTypes"
Item {
id: root
property string backButtonImage
property string actionButtonImage
property var backButtonFunction
property var actionButtonFunction
property string headerText
@ -22,25 +19,6 @@ Item {
id: content
anchors.fill: parent
ImageButtonType {
id: backButton
Layout.leftMargin: -6
image: root.backButtonImage
imageColor: "#D7D8DB"
visible: image ? true : false
onClicked: {
if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction()
} else {
closePage()
}
}
}
RowLayout {
Header1TextType {
id: header

View file

@ -11,9 +11,11 @@ ProgressBar {
color: "#412102"
}
contentItem: Rectangle {
width: root.visualPosition * root.width
height: root.height
color: "#FBB26A"
contentItem: Item {
Rectangle {
width: root.visualPosition * parent.width
height: parent.height
color: "#FBB26A"
}
}
}

View file

@ -59,7 +59,6 @@ Switch {
}
}
contentItem: ColumnLayout {
contentItem: ColumnLayout {
id: content

View file

@ -6,7 +6,6 @@ Item {
id: root
property string headerText
property string textFieldText
property string textFieldPlaceholderText
property bool textFieldEditable: true
@ -14,6 +13,7 @@ Item {
property var clickedFunc
property alias textField: textField
property alias textFieldText: textField.text
implicitHeight: 74
@ -53,7 +53,6 @@ Item {
id: textField
enabled: root.textFieldEditable
text: root.textFieldText
color: "#d7d8db"
placeholderText: textFieldPlaceholderText