mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-12 22:56:55 +00:00
UseRecoveryPhraseFlow parametrized, type property added
This commit is contained in:
parent
9673e3515e
commit
3ab2b7c86b
@ -9,6 +9,11 @@ import AppLayouts.Onboarding2.pages 1.0
|
|||||||
SQUtils.QObject {
|
SQUtils.QObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
enum Type {
|
||||||
|
NewProfile,
|
||||||
|
KeycardRecovery
|
||||||
|
}
|
||||||
|
|
||||||
required property StackView stackView
|
required property StackView stackView
|
||||||
|
|
||||||
required property var passwordStrengthScoreFunction
|
required property var passwordStrengthScoreFunction
|
||||||
@ -18,15 +23,21 @@ SQUtils.QObject {
|
|||||||
signal setPasswordRequested(string password)
|
signal setPasswordRequested(string password)
|
||||||
signal finished
|
signal finished
|
||||||
|
|
||||||
function init() {
|
function init(type = UseRecoveryPhraseFlow.Type.NewProfile) {
|
||||||
root.stackView.push(seedphrasePage)
|
let title = ""
|
||||||
|
|
||||||
|
if (type === UseRecoveryPhraseFlow.Type.NewProfile)
|
||||||
|
title = qsTr("Create profile using a recovery phrase")
|
||||||
|
else if (type === UseRecoveryPhraseFlow.Type.KeycardRecovery)
|
||||||
|
title = qsTr("Enter recovery phrase of lost Keycard")
|
||||||
|
|
||||||
|
root.stackView.push(seedphrasePage, { title })
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: seedphrasePage
|
id: seedphrasePage
|
||||||
|
|
||||||
SeedphrasePage {
|
SeedphrasePage {
|
||||||
title: qsTr("Create profile using a recovery phrase")
|
|
||||||
isSeedPhraseValid: root.isSeedPhraseValid
|
isSeedPhraseValid: root.isSeedPhraseValid
|
||||||
|
|
||||||
onSeedphraseSubmitted: (seedphrase) => {
|
onSeedphraseSubmitted: (seedphrase) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user