From 3ab2b7c86b2e76a62bdcb0512381c72040cd9915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Fri, 24 Jan 2025 01:04:25 +0100 Subject: [PATCH] UseRecoveryPhraseFlow parametrized, type property added --- .../Onboarding2/UseRecoveryPhraseFlow.qml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ui/app/AppLayouts/Onboarding2/UseRecoveryPhraseFlow.qml b/ui/app/AppLayouts/Onboarding2/UseRecoveryPhraseFlow.qml index 96f183f8d3..f9f2523cad 100644 --- a/ui/app/AppLayouts/Onboarding2/UseRecoveryPhraseFlow.qml +++ b/ui/app/AppLayouts/Onboarding2/UseRecoveryPhraseFlow.qml @@ -9,6 +9,11 @@ import AppLayouts.Onboarding2.pages 1.0 SQUtils.QObject { id: root + enum Type { + NewProfile, + KeycardRecovery + } + required property StackView stackView required property var passwordStrengthScoreFunction @@ -18,15 +23,21 @@ SQUtils.QObject { signal setPasswordRequested(string password) signal finished - function init() { - root.stackView.push(seedphrasePage) + function init(type = UseRecoveryPhraseFlow.Type.NewProfile) { + 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 { id: seedphrasePage SeedphrasePage { - title: qsTr("Create profile using a recovery phrase") isSeedPhraseValid: root.isSeedPhraseValid onSeedphraseSubmitted: (seedphrase) => {