mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
LockScreen: fingerprint auth without key or button
This commit is contained in:
@@ -36,9 +36,13 @@ Scope {
|
||||
infoMessage = "";
|
||||
showFailure = false;
|
||||
errorMessage = "";
|
||||
if (!waitingForPassword) {
|
||||
pam.abort();
|
||||
}
|
||||
occupyFingerprintSensorProc.running = true;
|
||||
} else {
|
||||
occupyFingerprintSensorProc.running = false;
|
||||
pam.start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,17 +55,12 @@ Scope {
|
||||
|
||||
if (waitingForPassword) {
|
||||
pam.respond(currentText);
|
||||
unlockInProgress = true;
|
||||
waitingForPassword = false;
|
||||
showInfo = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (root.unlockInProgress) {
|
||||
Logger.i("LockContext", "Unlock already in progress, ignoring duplicate attempt");
|
||||
return;
|
||||
}
|
||||
|
||||
root.unlockInProgress = true;
|
||||
errorMessage = "";
|
||||
showFailure = false;
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ Loader {
|
||||
width: 0
|
||||
height: 0
|
||||
visible: false
|
||||
enabled: !lockContext.unlockInProgress || lockContext.waitingForPassword
|
||||
enabled: !lockContext.unlockInProgress
|
||||
font.pointSize: Style.fontSizeM
|
||||
color: Color.mPrimary
|
||||
echoMode: TextInput.Password
|
||||
|
||||
@@ -20,6 +20,10 @@ Item {
|
||||
required property var keyboardLayout
|
||||
required property TextInput passwordInput
|
||||
|
||||
Component.onCompleted: {
|
||||
doUnlock();
|
||||
}
|
||||
|
||||
function doUnlock() {
|
||||
if (lockControl) {
|
||||
lockControl.tryUnlock();
|
||||
@@ -620,7 +624,7 @@ Item {
|
||||
radius: Math.min(Style.iRadiusL, width / 2)
|
||||
color: eyeButtonArea.containsMouse ? Color.mPrimary : "transparent"
|
||||
visible: passwordInput.text.length > 0
|
||||
enabled: !lockContext || !lockContext.unlockInProgress || lockContext.waitingForPassword
|
||||
enabled: !lockContext || !lockContext.unlockInProgress
|
||||
|
||||
NIcon {
|
||||
anchors.centerIn: parent
|
||||
@@ -664,7 +668,7 @@ Item {
|
||||
color: submitButtonArea.containsMouse ? Color.mPrimary : "transparent"
|
||||
border.color: Color.mPrimary
|
||||
border.width: Style.borderS
|
||||
enabled: !lockControl || !lockControl.unlockInProgress || lockControl.waitingForPassword
|
||||
enabled: !lockContext || !lockContext.unlockInProgress
|
||||
|
||||
NIcon {
|
||||
anchors.centerIn: parent
|
||||
|
||||
Reference in New Issue
Block a user