lock: add password box content timeout

This commit is contained in:
end-4
2025-07-21 10:45:33 +07:00
parent c5f8377a85
commit a7805af421
@@ -15,10 +15,18 @@ Scope {
property bool unlockInProgress: false property bool unlockInProgress: false
property bool showFailure: false property bool showFailure: false
// Clear the failure text once the user starts typing. Timer {
id: passwordClearTimer
interval: 10000
onTriggered: {
root.currentText = "";
}
}
onCurrentTextChanged: { onCurrentTextChanged: {
showFailure = false; showFailure = false; // Clear the failure text once the user starts typing.
GlobalStates.screenLockContainsCharacters = currentText.length > 0; GlobalStates.screenLockContainsCharacters = currentText.length > 0;
passwordClearTimer.restart();
} }
function tryUnlock() { function tryUnlock() {