mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-19 10:09:38 +00:00
- integrate the PUK unblock flow into the Onboarding and Login screen - added a dedicated SB page for it - remove the `Locked` keycard state everywhere in favor of `BlockedPIN` and `BlockedPUK` - fix the various "Locked" buttons, based on the context and the state of the keycard Fixes: #17092
44 lines
1.3 KiB
QML
44 lines
1.3 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
|
|
import AppLayouts.Onboarding2.pages 1.0
|
|
|
|
Item {
|
|
id: root
|
|
|
|
readonly property string existingPuk: "111111111111"
|
|
|
|
KeycardEnterPukPage {
|
|
id: page
|
|
anchors.fill: parent
|
|
remainingAttempts: 3
|
|
tryToSetPukFunction: (puk) => {
|
|
console.warn("!!! ATTEMPTED PUK:", puk)
|
|
const valid = puk === root.existingPuk
|
|
if (!valid)
|
|
remainingAttempts--
|
|
return valid
|
|
}
|
|
onKeycardPukEntered: (puk) => {
|
|
console.warn("!!! CORRECT PUK:", puk)
|
|
console.warn("!!! RESETTING FLOW")
|
|
state = "entering"
|
|
}
|
|
onKeycardFactoryResetRequested: {
|
|
console.warn("onKeycardFactoryResetRequested")
|
|
console.warn("!!! RESETTING FLOW")
|
|
state = "entering"
|
|
remainingAttempts = 3
|
|
}
|
|
}
|
|
|
|
Label {
|
|
anchors.bottom: parent.bottom
|
|
anchors.right: parent.right
|
|
text: "Hint: %1".arg(root.existingPuk)
|
|
}
|
|
}
|
|
|
|
// category: Onboarding
|
|
// status: good
|