Sending register, handling register result, sending login
This commit is contained in:
parent
89aa830bfa
commit
73e91e658f
15 changed files with 295 additions and 90 deletions
12
qml/Components/CMakeLists.txt
Normal file
12
qml/Components/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
qt_add_qml_module(magpieComponents
|
||||
URI magpie.Components
|
||||
VERSION 1.0
|
||||
STATIC
|
||||
RESOURCE_PREFIX /
|
||||
OUTPUT_DIRECTORY ../magpie/Components
|
||||
NO_PLUGIN
|
||||
QML_FILES
|
||||
Modal.qml
|
||||
)
|
||||
|
||||
target_link_libraries(magpie PRIVATE magpieComponents)
|
61
qml/Components/Modal.qml
Normal file
61
qml/Components/Modal.qml
Normal file
|
@ -0,0 +1,61 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Popup {
|
||||
property bool inProgress: false
|
||||
property string status: ""
|
||||
|
||||
id: modal
|
||||
anchors.centerIn: parent
|
||||
modal: true
|
||||
focus: true
|
||||
width: column.width + 60
|
||||
height: column.height + 60
|
||||
closePolicy: Popup.CloseOnEscape
|
||||
onClosed: inProgress = false
|
||||
|
||||
Column {
|
||||
id: column
|
||||
anchors.centerIn: parent
|
||||
spacing: 10
|
||||
Label {
|
||||
text: status
|
||||
width: 300
|
||||
wrapMode: Label.WordWrap
|
||||
horizontalAlignment: Label.AlignHCenter
|
||||
}
|
||||
BusyIndicator {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: inProgress
|
||||
running: inProgress
|
||||
}
|
||||
Button {
|
||||
text: qsTr("Close")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: !inProgress
|
||||
onClicked: modal.close()
|
||||
focus: true
|
||||
Keys.onReturnPressed: {
|
||||
if (!inProgress)
|
||||
modal.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enter: Transition {
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
exit: Transition {
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
from: 1.0
|
||||
to: 0.0
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue