Login loading icon

Add standard mechanism in HButton for loading icon display;
have HImage and HIcon base components.
This commit is contained in:
miruka
2019-04-26 21:16:45 -04:00
parent dc2f779d4b
commit 102baccbe5
7 changed files with 72 additions and 35 deletions

View File

@@ -11,9 +11,9 @@ Image {
source: "../../images/login_background.jpg"
function login() {
Backend.clientManager.new(
loginButton.loadingUntilFutureDone(Backend.clientManager.new(
"matrix.org", identifierField.text, passwordField.text
)
))
}
Rectangle {
@@ -119,10 +119,13 @@ Image {
Base.HButton {
text: qsTr("Register")
Layout.fillWidth: true
Layout.preferredHeight: 32
}
Base.HButton {
id: loginButton
text: qsTr("Login")
Layout.fillWidth: true
Layout.preferredHeight: 32
MouseArea {
anchors.fill: parent
@@ -132,6 +135,7 @@ Image {
Base.HButton {
text: qsTr("Forgot?")
Layout.fillWidth: true
Layout.preferredHeight: 32
}
}
}