LockScreen: add autoStartAuth option

This commit is contained in:
wxlyyy
2026-01-26 04:17:46 +08:00
parent 42bfa9fb1c
commit de3e522cd2
6 changed files with 19 additions and 3 deletions
+2
View File
@@ -1090,6 +1090,8 @@
"weather-show-in-calendar-label": "Display weather in calendar"
},
"lock-screen": {
"auto-start-auth-description": "e.g., automatically starts fingerprint authentication without requiring a key press or button click.",
"auto-start-auth-label": "Auto-start authentication",
"compact-lockscreen-description": "Show only the login input and system controls, hiding weather and media widgets.",
"compact-lockscreen-label": "Compact lock screen",
"lock-on-suspend-description": "Automatically lock the screen when suspending the system.",
+2 -1
View File
@@ -86,7 +86,8 @@
"showChangelogOnStartup": true,
"telemetryEnabled": false,
"enableLockScreenCountdown": true,
"lockScreenCountdownDuration": 10000
"lockScreenCountdownDuration": 10000,
"autoStartAuth": false
},
"ui": {
"fontDefault": "",
+1
View File
@@ -279,6 +279,7 @@ Singleton {
property bool telemetryEnabled: false
property bool enableLockScreenCountdown: true
property int lockScreenCountdownDuration: 10000
property bool autoStartAuth: false
}
// ui
+3 -1
View File
@@ -56,7 +56,9 @@ Scope {
}
} else {
occupyFingerprintSensorProc.running = false;
pam.start();
if (Settings.data.general.autoStartAuth) {
pam.start();
}
}
}
+3 -1
View File
@@ -21,7 +21,9 @@ Item {
required property TextInput passwordInput
Component.onCompleted: {
doUnlock();
if (Settings.data.general.autoStartAuth) {
doUnlock();
}
}
function doUnlock() {
@@ -25,6 +25,14 @@ ColumnLayout {
defaultValue: Settings.getDefaultValue("general.compactLockScreen")
}
NToggle {
label: I18n.tr("panels.lock-screen.auto-start-auth-label")
description: I18n.tr("panels.lock-screen.auto-start-auth-description")
checked: Settings.data.general.autoStartAuth
onToggled: checked => Settings.data.general.autoStartAuth = checked
defaultValue: Settings.getDefaultValue("general.autoStartAuth")
}
NToggle {
label: I18n.tr("panels.lock-screen.show-session-buttons-label")
description: I18n.tr("panels.lock-screen.show-session-buttons-description")