2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
2022-03-04 23:31:31 +00:00
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2022-03-04 23:31:31 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import "../popups"
|
2022-03-07 22:59:38 +00:00
|
|
|
import "../stores"
|
2022-03-04 23:31:31 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
Item {
|
|
|
|
id: root
|
2022-03-04 23:31:31 +00:00
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
property StartupStore startupStore
|
2022-03-04 23:31:31 +00:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
2022-07-20 12:34:44 +00:00
|
|
|
if (root.startupStore.showBeforeGetStartedPopup()) {
|
2022-03-07 22:59:38 +00:00
|
|
|
beforeGetStartedModal.open();
|
2023-04-03 09:15:34 +00:00
|
|
|
return
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2023-04-03 09:15:34 +00:00
|
|
|
btnNewUser.forceActiveFocus()
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
|
2024-07-19 12:15:50 +00:00
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
function showMetricsAndRunAction(action) {
|
2024-08-08 20:53:49 +00:00
|
|
|
Global.openMetricsEnablePopupRequested(Constants.metricsEnablePlacement.welcome, popup => popup.closed.connect(() => action()))
|
2024-07-19 12:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-04 23:31:31 +00:00
|
|
|
BeforeGetStartedModal {
|
|
|
|
id: beforeGetStartedModal
|
2022-03-07 22:59:38 +00:00
|
|
|
onClosed: {
|
2022-07-20 12:34:44 +00:00
|
|
|
root.startupStore.beforeGetStartedPopupAccepted()
|
2023-04-03 09:15:34 +00:00
|
|
|
btnNewUser.forceActiveFocus()
|
2022-03-07 22:59:38 +00:00
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: container
|
|
|
|
width: 425
|
2022-05-25 15:24:01 +00:00
|
|
|
height: 513
|
2022-06-20 09:50:57 +00:00
|
|
|
anchors.centerIn: parent
|
2022-03-04 23:31:31 +00:00
|
|
|
|
|
|
|
Image {
|
|
|
|
id: keysImg
|
2022-07-20 13:37:00 +00:00
|
|
|
width: 230
|
|
|
|
height: 230
|
2022-03-04 23:31:31 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2024-10-15 19:26:12 +00:00
|
|
|
source: Theme.png("onboarding/welcome")
|
2022-03-04 23:31:31 +00:00
|
|
|
mipmap: true
|
2023-04-26 15:33:24 +00:00
|
|
|
cache: false
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: txtTitle1
|
|
|
|
text: qsTr("Welcome to Status")
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.bigPadding
|
2022-03-04 23:31:31 +00:00
|
|
|
font.bold: true
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: keysImg.bottom
|
|
|
|
font.letterSpacing: -0.2
|
|
|
|
font.pixelSize: 22
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: txtDesc1
|
2024-10-15 19:26:12 +00:00
|
|
|
color: Theme.palette.secondaryText
|
2024-08-05 10:55:28 +00:00
|
|
|
text: qsTr("Your fully decentralized gateway to Ethereum and Web3. Crypto wallet, privacy first group chat, and communities.")
|
2022-03-04 23:31:31 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: txtTitle1.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.padding
|
2022-03-04 23:31:31 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: btnNewUser
|
2022-07-29 22:51:34 +00:00
|
|
|
objectName: "welcomeViewIAmNewToStatusButton"
|
2022-03-04 23:31:31 +00:00
|
|
|
anchors.top: txtDesc1.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.xlPadding
|
2022-03-04 23:31:31 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
text: qsTr("I am new to Status")
|
|
|
|
onClicked: {
|
2024-07-19 12:15:50 +00:00
|
|
|
d.showMetricsAndRunAction(root.startupStore.doPrimaryAction)
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2023-04-03 09:15:34 +00:00
|
|
|
Keys.onPressed: {
|
|
|
|
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
|
|
|
|
event.accepted = true
|
2024-07-19 12:15:50 +00:00
|
|
|
d.showMetricsAndRunAction(root.startupStore.doPrimaryAction)
|
2023-04-03 09:15:34 +00:00
|
|
|
}
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
|
2022-04-27 07:58:09 +00:00
|
|
|
StatusFlatButton {
|
2022-03-04 23:31:31 +00:00
|
|
|
id: btnExistingUser
|
|
|
|
text: qsTr("I already use Status")
|
|
|
|
anchors.top: btnNewUser.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.bigPadding
|
2022-03-04 23:31:31 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
onClicked: {
|
2024-07-19 12:15:50 +00:00
|
|
|
d.showMetricsAndRunAction(root.startupStore.doSecondaryAction)
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|