2022-03-07 22:59:38 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.12
|
|
|
|
import QtQuick.Layouts 1.12
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
|
|
|
import shared.panels 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import "../controls"
|
|
|
|
import "../panels"
|
|
|
|
import "../stores"
|
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
Item {
|
2022-03-07 22:59:38 +00:00
|
|
|
id: root
|
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
property StartupStore startupStore
|
2022-03-07 22:59:38 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: container
|
|
|
|
enabled: !dimBackground.active
|
|
|
|
anchors.centerIn: parent
|
|
|
|
width: 425
|
|
|
|
height: {
|
|
|
|
let h = 0
|
|
|
|
const children = this.children
|
|
|
|
Object.keys(children).forEach(function (key) {
|
|
|
|
const child = children[key]
|
|
|
|
h += child.height + Style.current.padding
|
|
|
|
})
|
|
|
|
return h
|
|
|
|
}
|
|
|
|
Image {
|
|
|
|
id: keysImg
|
2022-05-24 10:46:27 +00:00
|
|
|
width: 188
|
|
|
|
height: 185
|
2022-03-07 22:59:38 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: parent.top
|
|
|
|
fillMode: Image.PreserveAspectFit
|
2022-04-07 11:12:29 +00:00
|
|
|
antialiasing: true
|
|
|
|
source: Style.png("onboarding/fingerprint@2x")
|
2022-03-07 22:59:38 +00:00
|
|
|
mipmap: true
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: txtTitle
|
|
|
|
text: qsTr("Biometrics")
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
font.bold: true
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: keysImg.bottom
|
|
|
|
font.letterSpacing: -0.2
|
|
|
|
font.pixelSize: 22
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: txtDesc
|
|
|
|
width: 426
|
|
|
|
anchors.top: txtTitle.bottom
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
color: Style.current.secondaryText
|
2022-07-18 11:13:40 +00:00
|
|
|
text: qsTr("Would you like to use Touch ID\nto login to Status?")
|
2022-03-07 22:59:38 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.topMargin: 40
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: txtDesc.bottom
|
|
|
|
spacing: Style.current.bigPadding
|
|
|
|
StatusButton {
|
|
|
|
id: button
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
2022-05-03 07:28:16 +00:00
|
|
|
text: qsTr("Yes, use Touch ID")
|
2022-03-07 22:59:38 +00:00
|
|
|
onClicked: {
|
2022-07-20 12:34:44 +00:00
|
|
|
dimBackground.active = true
|
|
|
|
root.startupStore.doPrimaryAction()
|
2022-03-07 22:59:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
StatusBaseText {
|
|
|
|
id: keycardLink
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
color: Theme.palette.primaryColor1
|
2022-05-03 07:28:16 +00:00
|
|
|
text: qsTr("I prefer to use my password")
|
2022-05-23 09:03:57 +00:00
|
|
|
font.pixelSize: 15
|
2022-03-07 22:59:38 +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-03-07 22:59:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: dimBackground
|
|
|
|
anchors.fill: parent
|
|
|
|
active: false
|
|
|
|
sourceComponent: Rectangle {
|
|
|
|
color: Qt.rgba(0, 0, 0, 0.4)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|