1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-08 04:09:15 -04:00

feat(Greeter): add auto-login feature for startup settings

- Introduced a new cli flag:
`dms greeter sync --autologin-only`
and updated UI toggle in Greeter settings
This commit is contained in:
purian23
2026-06-02 02:03:02 -04:00
parent 8c20f448ed
commit 335c5b4ac5
12 changed files with 1106 additions and 156 deletions
+11 -1
View File
@@ -23,6 +23,11 @@ Singleton {
property var lastErrorTime: ({})
property int errorThrottleMs: 1000
property string currentCategory: ""
readonly property var stickyCategories: ["greeter-autologin-sync"]
function isStickyCategory(category) {
return category && stickyCategories.indexOf(category) >= 0
}
function showToast(message, level = levelInfo, details = "", command = "", category = "") {
const now = Date.now()
@@ -137,7 +142,9 @@ Singleton {
toastVisible = true
resetToastState()
if (toast.level === levelError && hasDetails) {
if (isStickyCategory(toast.category)) {
toastTimer.stop()
} else if (toast.level === levelError && hasDetails) {
toastTimer.interval = 8000
toastTimer.start()
} else {
@@ -153,6 +160,9 @@ Singleton {
}
function restartTimer() {
if (isStickyCategory(currentCategory)) {
return
}
if (hasDetails && currentLevel === levelError) {
toastTimer.interval = 8000
toastTimer.restart()