mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-24 04:28:58 +00:00
For the PIN pages: - add a `pinSettingInProgress` bool hint to `KeycardCreatePinPage` when setting/authorizing the PIN is in progress to be able to correctly display the Back button - don't display the "success" image yet when in progress - use the hint in related flows - extract the default attempts numbers to `Constants` For the backup seed phrase sequence: - the mnemonic is a string and gets submitted when exiting the BackupSeedphraseReveal, not right after its (re)creation - when starting the flow (going from `KeycardCreatePinDelayedPage`), replace instead of push, so that Back skips the PIN page - fixup the related SB pages Fixes #17218
46 lines
1.4 KiB
QML
46 lines
1.4 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
|
|
import AppLayouts.Onboarding2.pages 1.0
|
|
|
|
import utils 1.0
|
|
|
|
Item {
|
|
id: root
|
|
|
|
readonly property string existingPuk: "111111111111"
|
|
|
|
KeycardEnterPukPage {
|
|
id: page
|
|
anchors.fill: parent
|
|
remainingAttempts: Constants.onboarding.defaultPukAttempts
|
|
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 = Constants.onboarding.defaultPukAttempts
|
|
}
|
|
}
|
|
|
|
Label {
|
|
anchors.bottom: parent.bottom
|
|
anchors.right: parent.right
|
|
text: "Hint: %1".arg(root.existingPuk)
|
|
}
|
|
}
|
|
|
|
// category: Onboarding
|
|
// status: good
|