1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-03 02:52:07 -04:00

idle/lock: add option to turn off monitors after lock explicitly

This commit is contained in:
bbedward
2026-04-28 10:12:35 -04:00
parent 1919ca7243
commit 713ba1efbb
5 changed files with 70 additions and 69 deletions

View File

@@ -179,6 +179,8 @@ Scope {
abort();
return;
}
if (active)
return;
tries = 0;
errorTries = 0;
@@ -192,22 +194,23 @@ Scope {
if (!available)
return;
if (res === PamResult.Success) {
switch (res) {
case PamResult.Success:
if (!root.unlockInProgress) {
passwd.abort();
root.proceedAfterPrimaryAuth();
}
return;
}
if (res === PamResult.Error) {
root.fprintState = "error";
case PamResult.Error:
errorTries++;
if (errorTries < 5) {
if (errorTries < 200) {
abort();
errorRetry.restart();
return;
}
} else if (res === PamResult.MaxTries) {
abort();
return;
case PamResult.MaxTries:
tries++;
if (tries < SettingsData.maxFprintTries) {
root.fprintState = "fail";
@@ -216,6 +219,9 @@ Scope {
root.fprintState = "max";
abort();
}
break;
default:
return;
}
root.flashMsg();
@@ -294,7 +300,7 @@ Scope {
Timer {
id: errorRetry
interval: 800
interval: 1500
onTriggered: fprint.start()
}
@@ -346,26 +352,22 @@ Scope {
id: fprintStateReset
interval: 4000
onTriggered: {
root.fprintState = "";
fprint.errorTries = 0;
}
onTriggered: root.fprintState = ""
}
onLockSecuredChanged: {
if (lockSecured) {
SettingsData.refreshAuthAvailability();
root.state = "";
root.fprintState = "";
root.u2fState = "";
root.u2fPending = false;
root.lockMessage = "";
root.resetAuthFlows();
fprint.checkAvail();
u2f.checkAvail();
} else {
if (!lockSecured) {
root.resetAuthFlows();
return;
}
root.state = "";
root.fprintState = "";
root.u2fState = "";
root.u2fPending = false;
root.lockMessage = "";
root.resetAuthFlows();
fprint.checkAvail();
u2f.checkAvail();
}
Connections {