2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
2022-03-04 23:31:31 +00:00
|
|
|
import QtQuick.Layouts 1.12
|
2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick.Controls 2.13
|
2020-12-10 21:26:39 +00:00
|
|
|
import QtQuick.Controls.Universal 2.12
|
2021-10-12 18:26:02 +00:00
|
|
|
|
2021-10-20 12:23:58 +00:00
|
|
|
import StatusQ.Controls 0.1
|
2022-03-04 23:31:31 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-20 12:23:58 +00:00
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
2021-10-12 18:26:02 +00:00
|
|
|
import "../popups"
|
2022-03-07 22:59:38 +00:00
|
|
|
import "../controls"
|
2022-07-20 12:34:44 +00:00
|
|
|
import "../stores"
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
Item {
|
2022-03-04 23:31:31 +00:00
|
|
|
id: root
|
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
property StartupStore startupStore
|
2021-06-28 11:11:54 +00:00
|
|
|
|
2020-06-15 15:20:38 +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
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2022-05-25 15:24:01 +00:00
|
|
|
Item {
|
|
|
|
id: keysImgWrapperItem
|
|
|
|
width: 257
|
|
|
|
height: 257
|
2020-06-15 15:20:38 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-05-25 15:24:01 +00:00
|
|
|
Image {
|
|
|
|
id: keysImg
|
|
|
|
width: 257
|
|
|
|
height: 257
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
source: Style.png("onboarding/keys")
|
|
|
|
mipmap: true
|
|
|
|
}
|
2020-06-15 15:20:38 +00:00
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2022-03-04 23:31:31 +00:00
|
|
|
id: txtTitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("intro-wizard-title1") // FIXME: translations
|
2020-06-15 15:20:38 +00:00
|
|
|
font.bold: true
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-05-25 15:24:01 +00:00
|
|
|
anchors.top: keysImgWrapperItem.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-15 15:20:38 +00:00
|
|
|
font.letterSpacing: -0.2
|
|
|
|
font.pixelSize: 22
|
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2022-03-04 23:31:31 +00:00
|
|
|
id: txtDesc
|
2022-05-25 15:24:01 +00:00
|
|
|
height: 44
|
2020-06-15 15:20:38 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
2022-03-04 23:31:31 +00:00
|
|
|
anchors.top: txtTitle.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2022-05-25 15:24:01 +00:00
|
|
|
color: Style.current.secondaryText
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("a-set-of-keys-controls-your-account.-your-keys-live-on-your-device,-so-only-you-can-use-them.") // FIXME: translations
|
2022-05-25 15:24:01 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
2020-06-15 15:20:38 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
2022-05-25 15:24:01 +00:00
|
|
|
|
2022-03-04 23:31:31 +00:00
|
|
|
ColumnLayout {
|
|
|
|
anchors.top: txtDesc.bottom
|
2022-05-25 15:24:01 +00:00
|
|
|
anchors.topMargin: 32
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-03-04 23:31:31 +00:00
|
|
|
spacing: Style.current.bigPadding
|
|
|
|
StatusButton {
|
|
|
|
id: button
|
2022-07-29 22:51:34 +00:00
|
|
|
objectName: "keysMainViewPrimaryActionButton"
|
2022-05-25 15:24:01 +00:00
|
|
|
enabled: (opacity > 0.1)
|
2022-03-04 23:31:31 +00:00
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
onClicked: {
|
2022-07-20 12:34:44 +00:00
|
|
|
root.startupStore.doPrimaryAction()
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2022-05-25 15:24:01 +00:00
|
|
|
StatusBaseText {
|
|
|
|
id: keycardLink
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
color: Theme.palette.primaryColor1
|
2022-07-21 11:29:18 +00:00
|
|
|
font.pixelSize: 15
|
2022-05-25 15:24:01 +00:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
hoverEnabled: true
|
|
|
|
onEntered: {
|
|
|
|
parent.font.underline = true
|
|
|
|
}
|
|
|
|
onExited: {
|
|
|
|
parent.font.underline = false
|
|
|
|
}
|
|
|
|
onClicked: {
|
2022-07-20 12:34:44 +00:00
|
|
|
root.startupStore.doSecondaryAction()
|
2022-05-25 15:24:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: seedLink
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
color: Theme.palette.primaryColor1
|
2022-05-23 09:03:57 +00:00
|
|
|
font.pixelSize: 15
|
2022-03-04 23:31:31 +00:00
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
hoverEnabled: true
|
|
|
|
onEntered: {
|
|
|
|
parent.font.underline = true
|
|
|
|
}
|
|
|
|
onExited: {
|
|
|
|
parent.font.underline = false
|
|
|
|
}
|
|
|
|
onClicked: {
|
2022-07-20 12:34:44 +00:00
|
|
|
root.startupStore.doTertiaryAction()
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-15 15:20:38 +00:00
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2021-09-24 12:03:57 +00:00
|
|
|
|
2022-03-04 23:31:31 +00:00
|
|
|
states: [
|
|
|
|
State {
|
2022-07-20 12:34:44 +00:00
|
|
|
name: Constants.startupState.welcomeOldStatusUser
|
|
|
|
when: root.startupStore.currentStartupState.stateType === Constants.startupState.welcomeOldStatusUser
|
2022-05-25 15:24:01 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: keysImg
|
|
|
|
width: 160
|
|
|
|
height: 160
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: txtTitle
|
|
|
|
text: qsTr("Connect your keys")
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: txtDesc
|
|
|
|
text: qsTr("Use your existing Status keys to login to this device.")
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: button
|
2022-05-25 15:24:01 +00:00
|
|
|
// text: qsTr("Scan sync code")
|
|
|
|
//TODO remove when sync code is implemented
|
|
|
|
opacity: 0.0
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2022-10-12 11:13:12 +00:00
|
|
|
// TODO: Functionality is not completed. Missing saving of keystore files which blocks wallet account creation. @see #7867
|
|
|
|
// PropertyChanges {
|
|
|
|
// target: keycardLink
|
|
|
|
// text: qsTr("Login with Keycard")
|
|
|
|
// }
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: seedLink
|
|
|
|
text: qsTr("Enter a seed phrase")
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
2022-07-20 12:34:44 +00:00
|
|
|
name: Constants.startupState.welcomeNewStatusUser
|
|
|
|
when: root.startupStore.currentStartupState.stateType === Constants.startupState.welcomeNewStatusUser
|
2022-05-25 15:24:01 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: keysImg
|
|
|
|
width: 160
|
|
|
|
height: 160
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: txtTitle
|
|
|
|
text: qsTr("Get your keys")
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: txtDesc
|
|
|
|
text: qsTr("A set of keys controls your account. Your keys live on your\ndevice, so only you can use them.")
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: button
|
|
|
|
text: qsTr("Generate new keys")
|
2022-05-25 15:24:01 +00:00
|
|
|
//TODO remove when sync code is implemented
|
|
|
|
opacity: 1.0
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2022-07-21 11:29:18 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: keycardLink
|
|
|
|
text: qsTr("Generate keys for a new Keycard")
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: seedLink
|
2022-03-29 19:15:42 +00:00
|
|
|
text: qsTr("Import a seed phrase")
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
2022-07-20 12:34:44 +00:00
|
|
|
name: Constants.startupState.userProfileImportSeedPhrase
|
|
|
|
when: root.startupStore.currentStartupState.stateType === Constants.startupState.userProfileImportSeedPhrase
|
2022-05-25 15:24:01 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: keysImg
|
|
|
|
width: 257
|
|
|
|
height: 257
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: txtTitle
|
2022-03-29 19:15:42 +00:00
|
|
|
text: qsTr("Import a seed phrase")
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2022-04-27 08:32:41 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: keysImg
|
2022-05-24 10:46:27 +00:00
|
|
|
width: 257
|
|
|
|
height: 257
|
2022-04-27 08:32:41 +00:00
|
|
|
source: Style.png("onboarding/seed-phrase")
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: txtDesc
|
2022-05-25 15:24:01 +00:00
|
|
|
text: qsTr("Seed phrases are used to back up and restore your keys. Only use this option if you already have a seed phrase.")
|
2022-03-04 23:31:31 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: button
|
2022-03-29 19:15:42 +00:00
|
|
|
text: qsTr("Import a seed phrase")
|
2022-05-25 15:24:01 +00:00
|
|
|
//TODO remove when sync code is implemented
|
|
|
|
opacity: 1.0
|
2022-03-04 23:31:31 +00:00
|
|
|
}
|
2022-07-21 11:29:18 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: keycardLink
|
|
|
|
text: qsTr("Import a seed phrase into a new Keycard")
|
|
|
|
}
|
2022-03-04 23:31:31 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: seedLink
|
|
|
|
text: ""
|
|
|
|
visible: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2020-05-19 13:22:38 +00:00
|
|
|
}
|