2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtQuick.Controls 2.15
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
import StatusQ.Core 0.1
|
2021-11-01 09:42:00 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-06 09:16:39 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2023-04-04 11:31:04 +00:00
|
|
|
import shared.controls 1.0
|
2020-08-03 20:46:37 +00:00
|
|
|
|
|
|
|
Item {
|
2021-10-06 09:16:39 +00:00
|
|
|
id: root
|
2021-12-09 13:28:02 +00:00
|
|
|
|
2020-08-07 16:27:41 +00:00
|
|
|
signal startBtnClicked()
|
2020-08-03 20:46:37 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
property string username: ""
|
2021-12-09 13:28:02 +00:00
|
|
|
property int profileContentWidth
|
2023-04-04 11:31:04 +00:00
|
|
|
property bool startButtonEnabled: true
|
|
|
|
property string tooltipText
|
2021-10-06 09:16:39 +00:00
|
|
|
|
2022-07-13 12:29:38 +00:00
|
|
|
StatusScrollView {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: sview
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
2021-03-24 17:44:35 +00:00
|
|
|
anchors.top: parent.top
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.bottom: startBtn.top
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.bottomMargin: Theme.padding
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
2023-05-31 20:58:23 +00:00
|
|
|
|
|
|
|
contentWidth: availableWidth
|
2020-08-03 20:46:37 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: contentItem
|
2023-05-31 20:58:23 +00:00
|
|
|
width: sview.availableWidth
|
2022-12-13 15:49:31 +00:00
|
|
|
height: childrenRect.height
|
2020-08-03 20:46:37 +00:00
|
|
|
|
|
|
|
Image {
|
|
|
|
id: image
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2024-10-15 19:26:12 +00:00
|
|
|
source: Theme.png("ens/ens-header-" + Theme.palette.name + "@2x")
|
2023-04-26 15:33:24 +00:00
|
|
|
cache: false
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: title
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Get a universal username")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.top: image.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 24
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: subtitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("ENS names transform those crazy-long addresses into unique usernames.")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.top: title.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element1Number
|
|
|
|
text: "1"
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element1Title
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Customize your chat name")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element1Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element1Subtitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("An ENS name can replace your random 3-word name in chat. Be @yourname instead of %1.").arg(root.username)
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element1Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element1Title.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element2Number
|
|
|
|
text: "2"
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element1Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element2Title
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Simplify your ETH address")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element2Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element1Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element2Subtitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("You can receive funds to your easy-to-share ENS name rather than your hexadecimal hash (0x...).")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element2Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element2Title.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element3Number
|
|
|
|
text: "3"
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element2Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element3Title
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Receive transactions in chat")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element3Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element2Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element3Subtitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Others can send you funds via chat in one simple step.")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element3Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element3Title.bottom
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element4Number
|
|
|
|
text: "4"
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element3Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element4Title
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("10 SNT to register")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element4Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element3Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element4Subtitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Register once to keep the name forever. After 1 year you can release the name and get your SNT back.")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element4Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element4Title.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element5Number
|
|
|
|
text: "@"
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element4Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element5Title
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Already own a username?")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element5Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element4Subtitle.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element5Subtitle
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("You can verify and add any usernames you own in the next steps.")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element5Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element5Title.bottom
|
|
|
|
anchors.topMargin: 24
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 14
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: poweredBy
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Powered by Ethereum Name Services")
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.left: element5Number.right
|
|
|
|
anchors.leftMargin: 24
|
|
|
|
anchors.top: element5Subtitle.bottom
|
|
|
|
anchors.topMargin: 40
|
|
|
|
anchors.right: parent.right
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 11
|
2021-11-01 09:42:00 +00:00
|
|
|
color: Theme.palette.directColor1
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-12 15:44:27 +00:00
|
|
|
StatusButton {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: startBtn
|
2023-04-04 11:31:04 +00:00
|
|
|
interactive: startButtonEnabled
|
2024-03-12 15:44:27 +00:00
|
|
|
objectName: "ensStartButton"
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.bottomMargin: Theme.padding
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2023-04-04 11:31:04 +00:00
|
|
|
text: qsTr("Start")
|
2024-03-12 15:44:27 +00:00
|
|
|
tooltip.text: root.tooltipText
|
2020-08-07 16:27:41 +00:00
|
|
|
onClicked: startBtnClicked()
|
2020-08-03 20:46:37 +00:00
|
|
|
}
|
2020-09-14 12:12:47 +00:00
|
|
|
}
|
2021-10-06 09:16:39 +00:00
|
|
|
|