Sending register, handling register result, sending login

This commit is contained in:
Blue 2023-12-21 15:03:44 -03:00
parent 89aa830bfa
commit 73e91e658f
Signed by: blue
GPG key ID: 9B203B252A63EE38
15 changed files with 295 additions and 90 deletions

View 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
View 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
}
}
}