1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 05:55:37 -05:00

fix the f'd lock screen

This commit is contained in:
bbedward
2025-08-08 16:29:24 -04:00
parent 3bc7baa19a
commit 682a8cd7d6
2 changed files with 21 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ Item {
id: loader
WlSessionLock {
id: lock
id: sessionLock
property bool unlocked: false
property string sharedPasswordBuffer: ""
@@ -30,10 +30,11 @@ Item {
}
LockSurface {
lock: lock
sharedPasswordBuffer: lock.sharedPasswordBuffer
id: lockSurface
lock: sessionLock
sharedPasswordBuffer: sessionLock.sharedPasswordBuffer
onPasswordChanged: newPassword => {
lock.sharedPasswordBuffer = newPassword
sessionLock.sharedPasswordBuffer = newPassword
}
}
}

View File

@@ -15,35 +15,45 @@ WlSessionLockSurface {
signal passwordChanged(string newPassword)
property bool thisLocked: false
readonly property bool locked: thisLocked && !lock.unlocked
readonly property bool locked: thisLocked && lock && !lock.unlocked
function unlock(): void {
console.log("LockSurface.unlock() called")
if (lock) {
lock.unlocked = true
animDelay.start()
}
}
Component.onCompleted: {
thisLocked = true
}
Component.onDestruction: {
animDelay.stop()
}
color: "transparent"
Timer {
id: animDelay
interval: 1500 // Longer delay for success feedback
onTriggered: root.lock.locked = false
onTriggered: {
if (root.lock) {
root.lock.locked = false
}
}
}
PowerConfirmModal {
id: powerModal
id: powerConfirmModal
}
Loader {
anchors.fill: parent
sourceComponent: LockScreenContent {
demoMode: false
powerModal: powerModal
powerModal: powerConfirmModal
passwordBuffer: root.sharedPasswordBuffer
onUnlockRequested: root.unlock()
onPasswordBufferChanged: {