lock screen: clear password after 30s idle with wiggle

This commit is contained in:
Damocles 2026-04-23 23:23:02 +02:00
parent 7d9800374f
commit d38c4b5161

View file

@ -239,6 +239,27 @@ WlSessionLockSurface {
} }
} }
// Clear password after idle - wiggle then clear
Timer {
id: _clearTimer
interval: 30000
running: _keyInput.text.length > 0 && root.auth.state !== "busy"
onTriggered: {
if (!S.Theme.reducedMotion)
_shakeAnim.restart();
_keyInput.text = "";
}
}
// Restart clear timer on each keystroke
Connections {
target: _keyInput
function onTextChanged() {
if (_keyInput.text.length > 0)
_clearTimer.restart();
}
}
// Unlock animation // Unlock animation
property bool _unlocking: false property bool _unlocking: false