fix: use the standard loading animation for generating accounts

This commit is contained in:
Jonathan Rainville 2020-10-26 10:23:36 -04:00
parent c05cc09d20
commit a4b084ad79
1 changed files with 2 additions and 26 deletions

View File

@ -94,37 +94,14 @@ ModalPopup {
anchors.bottom: popup.bottom anchors.bottom: popup.bottom
anchors.left: parent.left anchors.left: parent.left
SVGImage {
id: loadingImg
visible: loading
anchors.top: submitBtn.top
anchors.topMargin: Style.current.padding
anchors.right: submitBtn.left
anchors.rightMargin: Style.current.padding
source: "../app/img/settings.svg"
width: 20
height: 20
fillMode: Image.Stretch
RotationAnimator {
target: loadingImg;
from: 0;
to: 360;
duration: 1200
running: true
loops: Animation.Infinite
}
}
StatusButton { StatusButton {
id: submitBtn id: submitBtn
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.topMargin: Style.current.padding anchors.topMargin: Style.current.padding
anchors.right: parent.right anchors.right: parent.right
text: loading ? state: loading ? "pending" : "default"
//% "Logging in..."
qsTrId("logging-in...") :
//% "Create password" //% "Create password"
qsTrId("create-password") text: qsTrId("create-password")
enabled: firstPasswordField.text !== "" && repeatPasswordField.text !== "" && !loading enabled: firstPasswordField.text !== "" && repeatPasswordField.text !== "" && !loading
@ -171,7 +148,6 @@ ModalPopup {
errorSound.play() errorSound.play()
return return
} }
// TODO this doesn't seem to work because the function freezes the view
loading = true loading = true
loginModel.isCurrentFlow = false; loginModel.isCurrentFlow = false;
onboardingModel.isCurrentFlow = true; onboardingModel.isCurrentFlow = true;