lock works

This commit is contained in:
2026-03-21 16:17:49 -05:00
parent cecf6df20a
commit 27db5bd480
9 changed files with 285 additions and 16 deletions

View File

@@ -18,18 +18,16 @@ Scope {
property bool busy: false
property bool failed: false
required property WlSessionLock lock
signal shouldUnlock()
onPassChanged: failed = false
function unlock() {
function doUnlock() {
if(pass == "") return;
if(!busy) {
root.busy = true
pam.start()
} else return;
root.busy = true
pam.start()
}
PamContext {
@@ -44,10 +42,13 @@ Scope {
onCompleted: result => {
if (result == PamResult.Success) {
lock.locked = false
root.shouldUnlock()
console.log("auth Success")
root.pass = "";
} else {
root.pass = "";
root.failed = true;
root.pass = "";
root.failed = true;
abort()
}
root.busy = false;