lock works
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user