fix: Wrap login error message in login view

This commit is contained in:
Alex Jbanca 2024-10-25 15:22:34 +03:00 committed by Alex Jbanca
parent 325d3588d3
commit 9352c2ad44
2 changed files with 10 additions and 2 deletions

View File

@ -18,6 +18,7 @@ SplitView {
SplitView.fillWidth: true
LoginView {
id: loginView
SplitView.fillWidth: true
SplitView.fillHeight: true
@ -25,7 +26,7 @@ SplitView {
readonly property QtObject startupModuleInst: QtObject {
readonly property int remainingAttempts: 5
signal accountLoginError
signal accountLoginError(string errorMessage)
signal obtainingPasswordSuccess
signal obtainingPasswordError
@ -79,7 +80,7 @@ SplitView {
}
readonly property QtObject currentStartupState: QtObject {
readonly property string stateType: Constants.startupState.welcome
readonly property string stateType: Constants.startupState.loginKeycardEnterPassword
}
function setPassword(password) {
@ -123,6 +124,12 @@ SplitView {
SplitView.preferredHeight: 200
logsView.logText: logs.logText
TextField {
id: error
placeholderText: "Error"
onAccepted: loginView.startupStore.startupModuleInst.accountLoginError(text)
}
}
}
}

View File

@ -184,6 +184,7 @@ Item {
horizontalAlignment: Text.AlignRight
font.pixelSize: 12
height: 16
width: inputField.width
color: validationErrorColor
wrapMode: TextEdit.Wrap
}