mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-04 11:16:03 +00:00
Switched to qmlformat.
This commit is contained in:
@@ -18,24 +18,24 @@ Scope {
|
||||
|
||||
onCurrentTextChanged: {
|
||||
if (currentText !== "") {
|
||||
showFailure = false
|
||||
errorMessage = ""
|
||||
showFailure = false;
|
||||
errorMessage = "";
|
||||
}
|
||||
}
|
||||
|
||||
function tryUnlock() {
|
||||
if (!pamAvailable) {
|
||||
errorMessage = "PAM not available"
|
||||
showFailure = true
|
||||
return
|
||||
errorMessage = "PAM not available";
|
||||
showFailure = true;
|
||||
return;
|
||||
}
|
||||
|
||||
root.unlockInProgress = true
|
||||
errorMessage = ""
|
||||
showFailure = false
|
||||
root.unlockInProgress = true;
|
||||
errorMessage = "";
|
||||
showFailure = false;
|
||||
|
||||
Logger.i("LockContext", "Starting PAM authentication for user:", pam.user)
|
||||
pam.start()
|
||||
Logger.i("LockContext", "Starting PAM authentication for user:", pam.user);
|
||||
pam.start();
|
||||
}
|
||||
|
||||
PamContext {
|
||||
@@ -44,48 +44,48 @@ Scope {
|
||||
user: HostService.username
|
||||
|
||||
onPamMessage: {
|
||||
Logger.i("LockContext", "PAM message:", message, "isError:", messageIsError, "responseRequired:", responseRequired)
|
||||
Logger.i("LockContext", "PAM message:", message, "isError:", messageIsError, "responseRequired:", responseRequired);
|
||||
|
||||
if (messageIsError) {
|
||||
errorMessage = message
|
||||
errorMessage = message;
|
||||
} else {
|
||||
infoMessage = message
|
||||
infoMessage = message;
|
||||
}
|
||||
|
||||
if (responseRequired) {
|
||||
Logger.i("LockContext", "Responding to PAM with password")
|
||||
respond(root.currentText)
|
||||
Logger.i("LockContext", "Responding to PAM with password");
|
||||
respond(root.currentText);
|
||||
}
|
||||
}
|
||||
|
||||
onResponseRequiredChanged: {
|
||||
Logger.i("LockContext", "Response required changed:", responseRequired)
|
||||
Logger.i("LockContext", "Response required changed:", responseRequired);
|
||||
if (responseRequired && root.unlockInProgress) {
|
||||
Logger.i("LockContext", "Automatically responding to PAM")
|
||||
respond(root.currentText)
|
||||
Logger.i("LockContext", "Automatically responding to PAM");
|
||||
respond(root.currentText);
|
||||
}
|
||||
}
|
||||
|
||||
onCompleted: result => {
|
||||
Logger.i("LockContext", "PAM completed with result:", result)
|
||||
Logger.i("LockContext", "PAM completed with result:", result);
|
||||
if (result === PamResult.Success) {
|
||||
Logger.i("LockContext", "Authentication successful")
|
||||
root.unlocked()
|
||||
Logger.i("LockContext", "Authentication successful");
|
||||
root.unlocked();
|
||||
} else {
|
||||
Logger.i("LockContext", "Authentication failed")
|
||||
errorMessage = "Authentication failed"
|
||||
showFailure = true
|
||||
root.failed()
|
||||
Logger.i("LockContext", "Authentication failed");
|
||||
errorMessage = "Authentication failed";
|
||||
showFailure = true;
|
||||
root.failed();
|
||||
}
|
||||
root.unlockInProgress = false
|
||||
root.unlockInProgress = false;
|
||||
}
|
||||
|
||||
onError: {
|
||||
Logger.i("LockContext", "PAM error:", error, "message:", message)
|
||||
errorMessage = message || "Authentication error"
|
||||
showFailure = true
|
||||
root.unlockInProgress = false
|
||||
root.failed()
|
||||
Logger.i("LockContext", "PAM error:", error, "message:", message);
|
||||
errorMessage = message || "Authentication error";
|
||||
showFailure = true;
|
||||
root.unlockInProgress = false;
|
||||
root.failed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user