status-desktop/ui/app/AppLayouts/Onboarding2/pages/KeycardCreatePinDelayedPage.qml
Michał Cieślak d1ac45ce6c Onboarding: KeycardCreatePinPage and SeedphrasePage refactored to be pure UI components
Now those components are not aware of any logic in the upper layer,
making the flows more structured and easier to follow.

Required for: #17232
2025-02-12 13:54:46 +01:00

41 lines
1009 B
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import AppLayouts.Onboarding.enums 1.0
/*!
\qmltype KeycardCreatePinDelayedPage
\inherits KeycardCreatePinPage
\brief It wraps KeycardCreatePinPage and controls it using authorizationState
and pinSettingState properties and adding minimal time of displaying a success
state.
*/
KeycardCreatePinPage {
id: root
required property int pinSettingState
required property int authorizationState
success: root.authorizationState === Onboarding.ProgressState.Success &&
root.pinSettingState === Onboarding.ProgressState.Success
signal finished
signal authorizationRequested
Timer {
interval: 2000
running: root.success
onTriggered: root.finished()
}
Connections {
target: root
function onPinSettingStateChanged() {
if (root.pinSettingState === Onboarding.ProgressState.Success)
root.authorizationRequested()
}
}
}