status-desktop/storybook/pages/KeycardEnterPinPagePage.qml
Jonathan Rainville 2d549f42be
feat: Implement the keycard flows for the new onboarding (#17127)
* feat(onboarding): integrate all keycard flows for the new onboarding

Fixes #17079

* chore: bump submodules to merged versions

* fix: rebase fixes

* chore: bump status-keycard-go to use Go 1.21

* feat: add FactoryResetting state

* chore: minor fixes

* add KeycardRemainingPinAttempts

* minor fixes

* minor fixes

---------

Co-authored-by: Igor Sirotin <sirotin@status.im>
2025-02-04 13:22:05 +00:00

64 lines
2.1 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import AppLayouts.Onboarding2.pages 1.0
import AppLayouts.Onboarding.enums 1.0
Item {
id: root
readonly property string existingPin: "111111"
KeycardEnterPinPage {
id: page
anchors.fill: parent
remainingAttempts: 3
unblockWithPukAvailable: ctrlUnblockWithPUK.checked
keycardPinInfoPageDelay: 1000
authorizationState: Onboarding.ProgressState.Idle
restoreKeysExportState: Onboarding.ProgressState.Idle
onAuthorizationRequested: (pin) => {
console.warn("!!! PIN:", pin)
console.warn("!!! RESETTING FLOW")
state = "entering"
}
onReloadKeycardRequested: {
console.warn("!!! RELOAD KEYCARD")
remainingAttempts--
state = "entering"
}
onKeycardFactoryResetRequested: {
console.warn("!!! FACTORY RESET KEYCARD")
remainingAttempts = 3
state = "entering"
}
}
RowLayout {
anchors.right: parent.right
anchors.bottom: parent.bottom
CheckBox {
id: ctrlUnblockWithPUK
text: "Unblock with PUK available"
checked: true
}
Item { Layout.fillWidth: true }
Label {
text: "Hint: %1".arg(root.existingPin)
}
}
}
// category: Onboarding
// status: good
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45942&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45950&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45959&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45966&node-type=frame&m=dev
// https://www.figma.com/design/Lw4nPYQcZOPOwTgETiiIYo/Desktop-Onboarding-Redesign?node-id=1281-45996&node-type=frame&m=dev