Updated showing wrong password exception. Fixes #1762

This commit is contained in:
staked-smart-ace 2021-01-26 22:37:58 +04:00 committed by Iuri Matias
parent cabc82782c
commit 214650df72

View File

@ -135,6 +135,10 @@ Item {
Keys.onReturnPressed: { Keys.onReturnPressed: {
submitBtn.clicked() submitBtn.clicked()
} }
onTextEdited: {
errMsg.visible = false
loading = false
}
} }
StatusRoundButton { StatusRoundButton {
id: submitBtn id: submitBtn
@ -176,7 +180,8 @@ Item {
onLoginResponseChanged: { onLoginResponseChanged: {
if (error) { if (error) {
errorSound.play() errorSound.play()
loginError.open() errMsg.visible = true;
} }
} }
} }
@ -186,7 +191,7 @@ Item {
//% "Generate new keys" //% "Generate new keys"
text: qsTrId("generate-new-keys") text: qsTrId("generate-new-keys")
anchors.top: txtPassword.bottom anchors.top: txtPassword.bottom
anchors.topMargin: 26 anchors.topMargin: 16
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 13 font.pixelSize: 13
type: "secondary" type: "secondary"
@ -195,6 +200,17 @@ Item {
onGenKeyClicked() onGenKeyClicked()
} }
} }
StyledText {
id: errMsg
anchors.top: generateKeysLinkText.bottom
anchors.topMargin: Style.current.smallPadding
anchors.horizontalCenter: parent.horizontalCenter
visible: false
text: qsTr("Login failed. Please re-enter your password and try again.")
font.pixelSize: 13
color: Style.current.danger
}
} }
} }