2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
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
|
|
|
|
|
|
|
import "../../../../shared"
|
2021-10-14 13:09:35 +00:00
|
|
|
import "../../../../shared/panels"
|
2021-10-12 18:26:02 +00:00
|
|
|
import "../../../../shared/status"
|
|
|
|
import "../popups"
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2020-05-19 13:22:38 +00:00
|
|
|
|
|
|
|
Page {
|
2020-06-15 15:20:38 +00:00
|
|
|
id: page
|
2020-05-19 13:22:38 +00:00
|
|
|
property alias btnExistingKey: btnExistingKey
|
|
|
|
property alias btnGenKey: btnGenKey
|
2021-09-24 12:03:57 +00:00
|
|
|
property alias btnKeycard: btnKeycard
|
2020-12-10 21:26:39 +00:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
color: Style.current.background
|
|
|
|
}
|
|
|
|
|
2021-06-28 11:11:54 +00:00
|
|
|
Component.onCompleted: {
|
2021-07-07 17:44:59 +00:00
|
|
|
if(displayBeforeGetStartedModal) {
|
|
|
|
displayBeforeGetStartedModal = false
|
2021-06-28 11:11:54 +00:00
|
|
|
beforeGetStartedModal.open()
|
2021-07-07 17:44:59 +00:00
|
|
|
}
|
2021-06-28 11:11:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
BeforeGetStartedModal {
|
|
|
|
id: beforeGetStartedModal
|
|
|
|
}
|
|
|
|
|
2020-06-15 15:20:38 +00:00
|
|
|
Item {
|
|
|
|
id: container
|
|
|
|
width: 425
|
|
|
|
height: {
|
|
|
|
let h = 0
|
|
|
|
const children = this.children
|
|
|
|
Object.keys(children).forEach(function (key) {
|
|
|
|
const child = children[key]
|
2020-07-02 15:14:31 +00:00
|
|
|
h += child.height + Style.current.padding
|
2020-06-15 15:20:38 +00:00
|
|
|
})
|
|
|
|
return h
|
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2020-06-15 15:20:38 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2020-05-19 13:22:38 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
2020-06-15 15:20:38 +00:00
|
|
|
Image {
|
|
|
|
id: keysImg
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: parent.top
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2021-09-28 15:04:06 +00:00
|
|
|
source: Style.png("keys")
|
2021-01-06 13:11:26 +00:00
|
|
|
width: 160
|
|
|
|
height: 160
|
2021-03-26 18:47:35 +00:00
|
|
|
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 {
|
2020-06-15 15:20:38 +00:00
|
|
|
id: txtTitle1
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Get your keys"
|
|
|
|
text: qsTrId("intro-wizard-title1")
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-15 15:20:38 +00:00
|
|
|
font.bold: true
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: keysImg.bottom
|
|
|
|
font.letterSpacing: -0.2
|
|
|
|
font.pixelSize: 22
|
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-15 15:20:38 +00:00
|
|
|
id: txtDesc1
|
2021-03-26 18:23:22 +00:00
|
|
|
color: Style.current.secondaryText
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "A set of keys controls your account. Your keys live on your device, so only you can use them."
|
|
|
|
text: qsTrId("a-set-of-keys-controls-your-account.-your-keys-live-on-your-device,-so-only-you-can-use-them.")
|
2020-06-15 15:20:38 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: txtTitle1.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-15 15:20:38 +00:00
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
StatusButton {
|
2020-06-15 15:20:38 +00:00
|
|
|
id: btnGenKey
|
|
|
|
anchors.top: txtDesc1.bottom
|
|
|
|
anchors.topMargin: 40
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "I'm new, generate keys"
|
2021-01-28 11:04:10 +00:00
|
|
|
text: qsTrId("im-new,-generate-keys")
|
2020-06-15 15:20:38 +00:00
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
StatusButton {
|
2020-06-15 15:20:38 +00:00
|
|
|
id: btnExistingKey
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Access existing key"
|
2021-01-28 11:04:10 +00:00
|
|
|
text: qsTrId("access-existing-key")
|
2020-06-15 15:20:38 +00:00
|
|
|
anchors.top: btnGenKey.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-15 15:20:38 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-01-28 11:04:10 +00:00
|
|
|
type: "secondary"
|
2020-06-15 15:20:38 +00:00
|
|
|
}
|
2021-09-24 12:03:57 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
id: btnKeycard
|
|
|
|
//% "I have a Keycard"
|
|
|
|
text: qsTr("I have a Keycard")
|
|
|
|
anchors.top: btnExistingKey.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
visible: isExperimental === "1" || appSettings.isKeycardEnabled
|
|
|
|
type: "secondary"
|
|
|
|
}
|
2020-06-15 15:20:38 +00:00
|
|
|
}
|
2020-05-19 13:22:38 +00:00
|
|
|
}
|