chore(Onboarding): continue the flow only after a successful unblock

- in other words, stop if we want some other flow instead, e.g. the
factory reset
This commit is contained in:
Lukáš Tinkl 2025-01-29 19:23:05 +01:00 committed by Lukáš Tinkl
parent bf5de4087e
commit 6e2e6ffc55
2 changed files with 6 additions and 4 deletions

View File

@ -360,7 +360,9 @@ SQUtils.QObject {
}
onKeycardFactoryResetRequested: root.keycardFactoryResetRequested()
onFinished: {
onFinished: (success) => {
if (!success)
return
if (root.loginScreen) {
root.loginRequested(root.loginScreen.selectedProfileKeyId,
Onboarding.LoginMethod.Keycard, { pin })

View File

@ -23,7 +23,7 @@ SQUtils.QObject {
signal keycardPinCreated(string pin)
signal reloadKeycardRequested
signal keycardFactoryResetRequested
signal finished
signal finished(bool success)
function init() {
root.stackView.push(d.initialComponent())
@ -47,7 +47,7 @@ SQUtils.QObject {
function finishWithFactoryReset() {
root.keycardFactoryResetRequested()
root.finished()
root.finished(false)
}
}
@ -101,7 +101,7 @@ SQUtils.QObject {
StatusButton {
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Continue")
onClicked: root.finished()
onClicked: root.finished(true)
}
]
}