lock screen: add lock.threatEffect toggle for fail visuals
This commit is contained in:
parent
c1588ceb5e
commit
be7142ba59
3 changed files with 10 additions and 3 deletions
|
|
@ -16,7 +16,8 @@ WlSessionLockSurface {
|
|||
property real _unlockFade: 1
|
||||
|
||||
// Threat level: 0.0-1.0 based on fail count (5 fails = max)
|
||||
readonly property real _threat: Math.min(1.0, root.auth.failCount / 5)
|
||||
readonly property bool _threatEnabled: S.Modules.lock.threatEffect ?? true
|
||||
readonly property real _threat: _threatEnabled ? Math.min(1.0, root.auth.failCount / 5) : 0
|
||||
property real _heartbeat: 0
|
||||
|
||||
// All visual content wrapped for threat shader
|
||||
|
|
@ -321,7 +322,7 @@ WlSessionLockSurface {
|
|||
SequentialAnimation {
|
||||
id: _heartbeatAnim
|
||||
loops: Animation.Infinite
|
||||
running: root.auth.failCount >= 3 && root.lock.secure
|
||||
running: root._threatEnabled && root.auth.failCount >= 3 && root.lock.secure
|
||||
|
||||
// Systole (sharp spike)
|
||||
NumberAnimation {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue