-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Onboarding: Unblock with seedphrase flow for login
Closes: #17142
- Loading branch information
Showing
5 changed files
with
82 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
ui/app/AppLayouts/Onboarding2/UnblockWithSeedphraseFlow.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
import StatusQ.Controls 0.1 | ||
import StatusQ.Core.Theme 0.1 | ||
import StatusQ.Core.Utils 0.1 as SQUtils | ||
import StatusQ.Core.Backpressure 0.1 | ||
|
||
import AppLayouts.Onboarding2.pages 1.0 | ||
import AppLayouts.Onboarding.enums 1.0 | ||
|
||
SQUtils.QObject { | ||
id: root | ||
|
||
required property StackView stackView | ||
|
||
required property var isSeedPhraseValid | ||
required property int keycardPinInfoPageDelay | ||
|
||
signal seedphraseSubmitted(string seedphrase) | ||
signal keycardPinCreated(string pin) | ||
|
||
function init() { | ||
root.stackView.push(seedphrasePage) | ||
} | ||
|
||
Component { | ||
id: seedphrasePage | ||
|
||
SeedphrasePage { | ||
title: qsTr("Unblock Keycard using the recovery phrase") | ||
btnContinueText: qsTr("Unblock Keycard") | ||
isSeedPhraseValid: root.isSeedPhraseValid | ||
onSeedphraseSubmitted: (seedphrase) => { | ||
root.seedphraseSubmitted(seedphrase) | ||
root.stackView.push(keycardCreatePinPage) | ||
} | ||
} | ||
} | ||
|
||
Component { | ||
id: keycardCreatePinPage | ||
|
||
KeycardCreatePinPage { | ||
onKeycardPinCreated: (pin) => { | ||
Backpressure.debounce(root, root.keycardPinInfoPageDelay, () => { | ||
root.keycardPinCreated(pin) | ||
})() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters