mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #1568 from bokicoder/main
LockScreen: add `autoStartAuth` option
This commit is contained in:
@@ -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.",
|
||||
|
||||
@@ -86,7 +86,8 @@
|
||||
"showChangelogOnStartup": true,
|
||||
"telemetryEnabled": false,
|
||||
"enableLockScreenCountdown": true,
|
||||
"lockScreenCountdownDuration": 10000
|
||||
"lockScreenCountdownDuration": 10000,
|
||||
"autoStartAuth": false
|
||||
},
|
||||
"ui": {
|
||||
"fontDefault": "",
|
||||
|
||||
@@ -279,6 +279,7 @@ Singleton {
|
||||
property bool telemetryEnabled: false
|
||||
property bool enableLockScreenCountdown: true
|
||||
property int lockScreenCountdownDuration: 10000
|
||||
property bool autoStartAuth: false
|
||||
}
|
||||
|
||||
// ui
|
||||
|
||||
@@ -56,7 +56,9 @@ Scope {
|
||||
}
|
||||
} else {
|
||||
occupyFingerprintSensorProc.running = false;
|
||||
pam.start();
|
||||
if (Settings.data.general.autoStartAuth) {
|
||||
pam.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user