status-desktop/ui/imports/shared/panels/DidYouKnowSplashScreen.qml
Lukáš Tinkl 3705249e40 feat(Onboarding): Create Profile & Login flows
- implement the basic Onboarding UI skeleton and the Create Profile
flows
- adjust the PasswordView and EnterSeedPhrase views to the latest design
- add the main OnboardingLayout and StatusPinInput pages to Storybook
- change terminology app-wide: "Seed phrase" -> "Recovery phrase"
- implement the Login flows (seed, sync, keycard)
- amend the keycard flow sequences with separate (non) empty page

Fixes #16719
Fixes #16742
Fixes #16743
2025-01-14 10:49:42 +01:00

83 lines
3.2 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import utils 1.0
import mainui 1.0
import shared.panels.private 1.0
Pane {
id: root
property alias progress: splashScreen.progress
property alias splashScreenText: splashScreen.text
property alias splashScreenSecondaryText: splashScreen.secondaryText
property bool messagesEnabled
contentItem: Item {
SplashScreen {
id: splashScreen
objectName: "didYouKnowSplashScreen"
anchors.centerIn: parent
}
ColumnLayout {
id: content
anchors.bottom: parent.bottom
width: parent.width
visible: root.progress !== 0 && root.messagesEnabled
Behavior on visible {
SequentialAnimation {
PropertyAction { target: content; property: "opacity"; value: visible ? 0 : didYouKnowText.opacity } //set opacity to 0 if the visible property changed to true
PropertyAction { } //set visible property
NumberAnimation { target: content; property: "opacity"; duration: 1000; to: visible ? 1 : didYouKnowText.opacity } //fade in
}
}
StatusBaseText {
id: didYouKnow
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: 12
color: Theme.palette.primaryColor1
font.weight: Font.DemiBold
font.pixelSize: Theme.asideTextFontSize
text: qsTr("DID YOU KNOW?")
}
StatusBaseText {
id: didYouKnowText
Layout.alignment: Qt.AlignHCenter
Layout.preferredHeight: 60
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
color: Theme.palette.directColor1
font.pixelSize: Theme.additionalTextSize
text: didYouKnowMessages.iterator.next()
Behavior on text {
SequentialAnimation {
NumberAnimation { target: didYouKnowText; properties: "opacity"; duration: 150; to: 0 } //fade out
PropertyAction { } //change text
NumberAnimation { target: didYouKnowText; properties: "opacity"; duration: 150; to: 1; }//fade in
}
}
DidYouKnowMessages {
id: didYouKnowMessages
}
Timer {
id: didYouKnowTimer
interval: 7000
repeat: true
running: didYouKnowText.visible
onTriggered: didYouKnowText.text = didYouKnowMessages.iterator.next()
}
}
}
}
background: Rectangle {
color: Theme.palette.background
}
}