lock screen: fix incorrect password text

This commit is contained in:
end-4
2025-08-11 15:07:47 +07:00
parent 7f1699663d
commit ea70c354ad
4 changed files with 9 additions and 11 deletions
@@ -24,7 +24,10 @@ Scope {
}
onCurrentTextChanged: {
showFailure = false; // Clear the failure text once the user starts typing.
if (currentText.length > 0) {
showFailure = false;
GlobalStates.screenUnlockFailed = false;
}
GlobalStates.screenLockContainsCharacters = currentText.length > 0;
passwordClearTimer.restart();
}
@@ -58,6 +61,7 @@ Scope {
root.unlocked();
} else {
root.showFailure = true;
GlobalStates.screenUnlockFailed = true;
}
root.currentText = "";
@@ -75,17 +75,10 @@ MouseArea {
animation: Appearance.animation.elementMove.numberAnimation.createObject(this)
}
radius: Appearance.rounding.full
color: Appearance.colors.colLayer2
color: Appearance.m3colors.m3surfaceContainer
implicitWidth: 160
implicitHeight: 44
StyledText {
visible: root.context.showFailure && passwordBox.text.length == 0
anchors.centerIn: parent
text: "Incorrect"
color: Appearance.m3colors.m3error
}
StyledTextInput {
id: passwordBox