2020-08-03 20:46:37 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import QtQuick.Controls 2.14
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2020-08-03 20:46:37 +00:00
|
|
|
|
|
|
|
Item {
|
2021-10-06 09:16:39 +00:00
|
|
|
id: root
|
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: ""
|
|
|
|
|
2020-08-03 20:46:37 +00:00
|
|
|
ScrollView {
|
|
|
|
id: sview
|
|
|
|
clip: true
|
|
|
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
|
|
|
contentHeight: contentItem.childrenRect.height
|
2021-03-24 17:44:35 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 24
|
2020-08-03 20:46:37 +00:00
|
|
|
anchors.bottom: startBtn.top
|
|
|
|
anchors.bottomMargin: Style.current.padding
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: contentItem
|
2021-04-08 15:44:58 +00:00
|
|
|
width: profileContainer.profileContentWidth
|
2021-03-23 16:34:52 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-08-03 20:46:37 +00:00
|
|
|
|
|
|
|
Image {
|
|
|
|
id: image
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2021-09-28 15:04:06 +00:00
|
|
|
source: Style.png("ens-header-" + Style.current.name + "@2x")
|
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
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Get a universal username"
|
|
|
|
text: qsTrId("ens-get-name")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: subtitle
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "ENS names transform those crazy-long addresses into unique usernames."
|
|
|
|
text: qsTrId("ens-welcome-hints")
|
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-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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element1Title
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Customize your chat name"
|
|
|
|
text: qsTrId("ens-welcome-point-customize-title")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element1Subtitle
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "An ENS name can replace your random 3-word name in chat. Be @yourname instead of %1."
|
2021-10-06 09:16:39 +00:00
|
|
|
text: qsTrId("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-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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element2Title
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Simplify your ETH address"
|
|
|
|
text: qsTrId("ens-welcome-point-simplify-title")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element2Subtitle
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "You can receive funds to your easy-to-share ENS name rather than your hexadecimal hash (0x...)."
|
|
|
|
text: qsTrId("ens-welcome-point-simplify")
|
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-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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element3Title
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Receive transactions in chat"
|
|
|
|
text: qsTrId("ens-welcome-point-receive-title")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element3Subtitle
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Others can send you funds via chat in one simple step."
|
|
|
|
text: qsTrId("ens-welcome-point-receive")
|
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-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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element4Title
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "10 SNT to register"
|
|
|
|
text: qsTrId("ens-welcome-point-register-title")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element4Subtitle
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Register once to keep the name forever. After 1 year you can release the name and get your SNT back."
|
|
|
|
text: qsTrId("ens-welcome-point-register")
|
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-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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element5Title
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Already own a username?"
|
|
|
|
text: qsTrId("ens-welcome-point-verify-title")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: element5Subtitle
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "You can verify and add any usernames you own in the next steps."
|
|
|
|
text: qsTrId("ens-welcome-point-verify")
|
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-10-06 09:16:39 +00:00
|
|
|
StatusBaseText {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: poweredBy
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Powered by Ethereum Name Services"
|
|
|
|
text: qsTrId("ens-powered-by")
|
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-01-28 11:04:10 +00:00
|
|
|
StatusButton {
|
2020-08-03 20:46:37 +00:00
|
|
|
id: startBtn
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: Style.current.padding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-08-09 15:23:44 +00:00
|
|
|
enabled: networkGuarded
|
2020-08-26 15:52:26 +00:00
|
|
|
//% "Start"
|
2021-01-28 11:04:10 +00:00
|
|
|
text: enabled ?
|
2020-09-14 12:12:47 +00:00
|
|
|
qsTrId("start") :
|
|
|
|
//% "Only available on Mainnet"
|
|
|
|
qsTrId("ens-network-restriction")
|
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
|
|
|
|