Merge pull request #229 from matejc/main

Fix for fingerprint flow on lock screen
This commit is contained in:
Lemmy 2025-09-14 22:18:14 -04:00 committed by GitHub
commit d80f923802
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View file

@ -12,6 +12,7 @@ Scope {
property bool unlockInProgress: false property bool unlockInProgress: false
property bool showFailure: false property bool showFailure: false
property string errorMessage: "" property string errorMessage: ""
property string infoMessage: ""
property bool pamAvailable: typeof PamContext !== "undefined" property bool pamAvailable: typeof PamContext !== "undefined"
onCurrentTextChanged: { onCurrentTextChanged: {
@ -28,12 +29,6 @@ Scope {
return return
} }
if (currentText === "") {
errorMessage = "Password required"
showFailure = true
return
}
root.unlockInProgress = true root.unlockInProgress = true
errorMessage = "" errorMessage = ""
showFailure = false showFailure = false
@ -52,6 +47,8 @@ Scope {
if (messageIsError) { if (messageIsError) {
errorMessage = message errorMessage = message
} else {
infoMessage = message
} }
if (responseRequired) { if (responseRequired) {

View file

@ -511,6 +511,7 @@ Loader {
width: 0 width: 0
height: 0 height: 0
visible: false visible: false
enabled: !lockContext.unlockInProgress
font.family: Settings.data.ui.fontFixed font.family: Settings.data.ui.fontFixed
font.pointSize: Style.fontSizeL * scaling font.pointSize: Style.fontSizeL * scaling
color: Color.mOnSurface color: Color.mOnSurface
@ -540,7 +541,7 @@ Loader {
color: Color.mOnSurface color: Color.mOnSurface
font.family: Settings.data.ui.fontFixed font.family: Settings.data.ui.fontFixed
font.pointSize: Style.fontSizeL * scaling font.pointSize: Style.fontSizeL * scaling
visible: passwordInput.activeFocus visible: passwordInput.activeFocus && !lockContext.unlockInProgress
SequentialAnimation { SequentialAnimation {
id: typingEffect id: typingEffect
@ -584,7 +585,7 @@ Loader {
NText { NText {
text: { text: {
if (lockContext.unlockInProgress) if (lockContext.unlockInProgress)
return "Authenticating..." return lockContext.infoMessage || "Authenticating..."
if (lockContext.showFailure && lockContext.errorMessage) if (lockContext.showFailure && lockContext.errorMessage)
return lockContext.errorMessage return lockContext.errorMessage
if (lockContext.showFailure) if (lockContext.showFailure)