From 130627f39c627971711572f3c02fc55805b8f6c6 Mon Sep 17 00:00:00 2001 From: Damocles Date: Wed, 22 Apr 2026 23:27:10 +0200 Subject: [PATCH] lock threat: stepped ramp with +0.1 per level above 5 --- shell/lock/LockSurface.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/lock/LockSurface.qml b/shell/lock/LockSurface.qml index 4abebc8..9520fde 100644 --- a/shell/lock/LockSurface.qml +++ b/shell/lock/LockSurface.qml @@ -21,8 +21,11 @@ WlSessionLockSurface { readonly property real _threat: { if (!_threatEnabled || root.auth.failCount <= 0) return 0; - const t = Math.min(1.0, root.auth.failCount / 5); - return t * t * 0.6; // quadratic: 1->0.024, 2->0.096, 3->0.216, 4->0.384, 5->0.6 + const levels = [0, 0.05, 0.12, 0.3, 0.45, 0.6]; + const n = root.auth.failCount; + if (n <= 5) + return levels[n]; + return Math.min(1.0, 0.6 + (n - 5) * 0.1); } property real _heartbeat: 0