mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 20:18:47 +00:00
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
51 lines
1.2 KiB
QML
51 lines
1.2 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import AppLayouts.Onboarding.enums 1.0
|
|
|
|
/*!
|
|
\qmltype KeycardAddKeyPairDelayedPage
|
|
\inherits KeycardAddKeyPairPage
|
|
\brief It wraps KeycardAddKeyPairPaget and controls it using addKeyPairState
|
|
property and adding minimal times of displaying particular states.
|
|
*/
|
|
KeycardAddKeyPairPage {
|
|
id: root
|
|
|
|
required property int addKeyPairState
|
|
|
|
inProgress: d.addKeyPairState !== Onboarding.ProgressState.Success
|
|
|
|
signal finished
|
|
|
|
QtObject {
|
|
id: d
|
|
|
|
property int addKeyPairState: root.addKeyPairState
|
|
|
|
readonly property int inProgressMinimalTime: 2000
|
|
readonly property int successMinimalTime: 2000
|
|
|
|
Binding on addKeyPairState {
|
|
when: extendingInProgressStateTimer.running
|
|
value: Onboarding.ProgressState.InProgress
|
|
}
|
|
}
|
|
|
|
Timer {
|
|
id: extendingInProgressStateTimer
|
|
|
|
interval: d.inProgressMinimalTime
|
|
running: true
|
|
}
|
|
|
|
Timer {
|
|
id: extendingSuccessStateTimer
|
|
|
|
running: root.addKeyPairState === Onboarding.ProgressState.Success
|
|
interval: d.successMinimalTime
|
|
|
|
onTriggered: root.finished()
|
|
}
|
|
}
|