lock screen: clear password after 30s idle with wiggle
This commit is contained in:
parent
7d9800374f
commit
d38c4b5161
1 changed files with 21 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue