mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 01:32:29 -04:00
lock: add lock at startup action, not sure how to handle it in crash
scenarios launcher v2: fix state reset in section changes fixes #1648
This commit is contained in:
@@ -483,6 +483,7 @@ Singleton {
|
|||||||
property bool lockScreenShowPasswordField: true
|
property bool lockScreenShowPasswordField: true
|
||||||
property bool lockScreenShowMediaPlayer: true
|
property bool lockScreenShowMediaPlayer: true
|
||||||
property bool lockScreenPowerOffMonitorsOnLock: false
|
property bool lockScreenPowerOffMonitorsOnLock: false
|
||||||
|
property bool lockAtStartup: false
|
||||||
|
|
||||||
property bool enableFprint: false
|
property bool enableFprint: false
|
||||||
property int maxFprintTries: 15
|
property int maxFprintTries: 15
|
||||||
|
|||||||
@@ -310,6 +310,7 @@ var SPEC = {
|
|||||||
lockScreenShowPasswordField: { def: true },
|
lockScreenShowPasswordField: { def: true },
|
||||||
lockScreenShowMediaPlayer: { def: true },
|
lockScreenShowMediaPlayer: { def: true },
|
||||||
lockScreenPowerOffMonitorsOnLock: { def: false },
|
lockScreenPowerOffMonitorsOnLock: { def: false },
|
||||||
|
lockAtStartup: { def: false },
|
||||||
enableFprint: { def: false },
|
enableFprint: { def: false },
|
||||||
maxFprintTries: { def: 15 },
|
maxFprintTries: { def: 15 },
|
||||||
fprintdAvailable: { def: false, persist: false },
|
fprintdAvailable: { def: false, persist: false },
|
||||||
|
|||||||
@@ -112,6 +112,11 @@ Item {
|
|||||||
function onViewModeVersionChanged() {
|
function onViewModeVersionChanged() {
|
||||||
Qt.callLater(root._rebuildVisualModel);
|
Qt.callLater(root._rebuildVisualModel);
|
||||||
}
|
}
|
||||||
|
function onSearchModeChanged() {
|
||||||
|
root._visualRows = [];
|
||||||
|
root._cumulativeHeights = [];
|
||||||
|
root._flatIndexToRowMap = {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetScroll() {
|
function resetScroll() {
|
||||||
@@ -355,9 +360,6 @@ Item {
|
|||||||
readonly property int versionTrigger: root.controller?.viewModeVersion ?? 0
|
readonly property int versionTrigger: root.controller?.viewModeVersion ?? 0
|
||||||
|
|
||||||
readonly property var stickyHeaderSection: {
|
readonly property var stickyHeaderSection: {
|
||||||
if (!root.controller?.sections || root.controller.sections.length === 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
var scrollY = mainListView.contentY - mainListView.originY;
|
var scrollY = mainListView.contentY - mainListView.originY;
|
||||||
if (scrollY <= 0)
|
if (scrollY <= 0)
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ Scope {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
IdleService.lockComponent = this;
|
IdleService.lockComponent = this;
|
||||||
|
if (SettingsData.lockAtStartup)
|
||||||
|
lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
function notifyLoginctl(lockAction: bool) {
|
function notifyLoginctl(lockAction: bool) {
|
||||||
@@ -204,7 +206,6 @@ Scope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LockScreenDemo {
|
LockScreenDemo {
|
||||||
|
|
||||||
id: demoWindow
|
id: demoWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,15 @@ Item {
|
|||||||
onToggled: checked => SettingsData.set("lockScreenPowerOffMonitorsOnLock", checked)
|
onToggled: checked => SettingsData.set("lockScreenPowerOffMonitorsOnLock", checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsToggleRow {
|
||||||
|
settingKey: "lockAtStartup"
|
||||||
|
tags: ["lock", "screen", "startup", "start", "boot", "login", "automatic"]
|
||||||
|
text: I18n.tr("Lock at startup")
|
||||||
|
description: I18n.tr("Automatically lock the screen when DMS starts")
|
||||||
|
checked: SettingsData.lockAtStartup
|
||||||
|
onToggled: checked => SettingsData.set("lockAtStartup", checked)
|
||||||
|
}
|
||||||
|
|
||||||
SettingsToggleRow {
|
SettingsToggleRow {
|
||||||
settingKey: "enableFprint"
|
settingKey: "enableFprint"
|
||||||
tags: ["lock", "screen", "fingerprint", "authentication", "biometric", "fprint"]
|
tags: ["lock", "screen", "fingerprint", "authentication", "biometric", "fprint"]
|
||||||
|
|||||||
Reference in New Issue
Block a user