2022-08-05 13:50:54 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
2022-08-31 17:09:07 +00:00
|
|
|
import "../helpers"
|
|
|
|
|
2022-08-05 13:50:54 +00:00
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var sharedKeycardModule
|
|
|
|
|
2022-08-31 17:09:07 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.migratingKeyPair) {
|
2022-09-13 10:03:25 +00:00
|
|
|
root.sharedKeycardModule.currentState.doPrimaryAction()
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
2022-09-02 11:04:59 +00:00
|
|
|
readonly property bool hideKeyPair: root.sharedKeycardModule.keycardData & Constants.predefinedKeycardData.hideKeyPair
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
|
2022-08-05 13:50:54 +00:00
|
|
|
Timer {
|
|
|
|
id: timer
|
|
|
|
interval: 1000
|
|
|
|
running: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.recognizedKeycard
|
|
|
|
onTriggered: {
|
|
|
|
root.sharedKeycardModule.currentState.doSecondaryAction()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-31 17:09:07 +00:00
|
|
|
Component {
|
|
|
|
id: keyPairComponent
|
|
|
|
KeyPairItem {
|
2022-09-02 11:04:59 +00:00
|
|
|
keyPairType: root.sharedKeycardModule.selectedKeyPairItem.pairType
|
2022-08-31 17:09:07 +00:00
|
|
|
keyPairPubKey: root.sharedKeycardModule.selectedKeyPairItem.pubKey
|
|
|
|
keyPairName: root.sharedKeycardModule.selectedKeyPairItem.name
|
|
|
|
keyPairIcon: root.sharedKeycardModule.selectedKeyPairItem.icon
|
|
|
|
keyPairImage: root.sharedKeycardModule.selectedKeyPairItem.image
|
|
|
|
keyPairDerivedFrom: root.sharedKeycardModule.selectedKeyPairItem.derivedFrom
|
|
|
|
keyPairAccounts: root.sharedKeycardModule.selectedKeyPairItem.accounts
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: knownKeyPairComponent
|
|
|
|
KeyPairItem {
|
2022-09-02 11:04:59 +00:00
|
|
|
keyPairType: root.sharedKeycardModule.keyPairStoredOnKeycard.pairType
|
2022-08-31 17:09:07 +00:00
|
|
|
keyPairPubKey: root.sharedKeycardModule.keyPairStoredOnKeycard.pubKey
|
|
|
|
keyPairName: root.sharedKeycardModule.keyPairStoredOnKeycard.name
|
|
|
|
keyPairIcon: root.sharedKeycardModule.keyPairStoredOnKeycard.icon
|
|
|
|
keyPairImage: root.sharedKeycardModule.keyPairStoredOnKeycard.image
|
|
|
|
keyPairDerivedFrom: root.sharedKeycardModule.keyPairStoredOnKeycard.derivedFrom
|
|
|
|
keyPairAccounts: root.sharedKeycardModule.keyPairStoredOnKeycard.accounts
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: unknownKeyPairCompontnt
|
|
|
|
KeyPairUnknownItem {
|
|
|
|
keyPairPubKey: root.sharedKeycardModule.keyPairStoredOnKeycard.pubKey
|
|
|
|
keyPairName: root.sharedKeycardModule.keyPairStoredOnKeycard.name
|
|
|
|
keyPairIcon: root.sharedKeycardModule.keyPairStoredOnKeycard.icon
|
|
|
|
keyPairImage: root.sharedKeycardModule.keyPairStoredOnKeycard.image
|
|
|
|
keyPairDerivedFrom: root.sharedKeycardModule.keyPairStoredOnKeycard.derivedFrom
|
|
|
|
keyPairAccounts: root.sharedKeycardModule.keyPairStoredOnKeycard.accounts
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-13 10:03:25 +00:00
|
|
|
Component {
|
|
|
|
id: keyPairForAuthenticationComponent
|
|
|
|
KeyPairItem {
|
|
|
|
keyPairType: root.sharedKeycardModule.keyPairForAuthentication.pairType
|
|
|
|
keyPairPubKey: root.sharedKeycardModule.keyPairForAuthentication.pubKey
|
|
|
|
keyPairName: root.sharedKeycardModule.keyPairForAuthentication.name
|
|
|
|
keyPairIcon: root.sharedKeycardModule.keyPairForAuthentication.icon
|
|
|
|
keyPairImage: root.sharedKeycardModule.keyPairForAuthentication.image
|
|
|
|
keyPairDerivedFrom: root.sharedKeycardModule.keyPairForAuthentication.derivedFrom
|
|
|
|
keyPairAccounts: root.sharedKeycardModule.keyPairForAuthentication.accounts
|
|
|
|
keyPairCardLocked: root.sharedKeycardModule.keyPairForAuthentication.locked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-31 17:09:07 +00:00
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.topMargin: Style.current.xlPadding
|
|
|
|
anchors.bottomMargin: Style.current.halfPadding
|
|
|
|
anchors.leftMargin: Style.current.xlPadding
|
|
|
|
anchors.rightMargin: Style.current.xlPadding
|
2022-08-05 13:50:54 +00:00
|
|
|
spacing: Style.current.padding
|
2022-08-31 17:09:07 +00:00
|
|
|
clip: true
|
2022-08-05 13:50:54 +00:00
|
|
|
|
2022-08-31 17:09:07 +00:00
|
|
|
KeycardImage {
|
2022-08-05 13:50:54 +00:00
|
|
|
id: image
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
Layout.preferredHeight: Constants.keycard.shared.imageHeight
|
|
|
|
Layout.preferredWidth: Constants.keycard.shared.imageWidth
|
2022-08-31 17:09:07 +00:00
|
|
|
|
|
|
|
onAnimationCompleted: {
|
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardInserted ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard) {
|
|
|
|
root.sharedKeycardModule.currentState.doSecondaryAction()
|
|
|
|
}
|
|
|
|
}
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Row {
|
|
|
|
spacing: Style.current.halfPadding
|
|
|
|
Layout.alignment: Qt.AlignCenter
|
2022-08-31 17:09:07 +00:00
|
|
|
Layout.preferredHeight: Constants.keycard.general.titleHeight
|
2022-08-05 13:50:54 +00:00
|
|
|
|
|
|
|
StatusIcon {
|
|
|
|
id: icon
|
|
|
|
visible: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.recognizedKeycard
|
|
|
|
width: Style.current.padding
|
|
|
|
height: Style.current.padding
|
|
|
|
icon: "checkmark"
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
StatusLoadingIndicator {
|
|
|
|
id: loading
|
2022-08-31 17:09:07 +00:00
|
|
|
visible: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.migratingKeyPair
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
StatusBaseText {
|
|
|
|
id: title
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusBaseText {
|
|
|
|
id: message
|
2022-08-31 17:09:07 +00:00
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
Layout.preferredHeight: Constants.keycard.general.messageHeight
|
2022-08-05 13:50:54 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
wrapMode: Text.WordWrap
|
|
|
|
}
|
2022-08-31 17:09:07 +00:00
|
|
|
|
|
|
|
Loader {
|
|
|
|
id: loader
|
|
|
|
Layout.preferredWidth: parent.width
|
|
|
|
active: {
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard) {
|
|
|
|
if((root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.pluginReader && !d.hideKeyPair) ||
|
|
|
|
(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.insertKeycard && !d.hideKeyPair) ||
|
|
|
|
(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardInserted && !d.hideKeyPair) ||
|
|
|
|
(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard && !d.hideKeyPair) ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.recognizedKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keyPairMigrateSuccess ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keyPairMigrateFailure ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.factoryReset) {
|
|
|
|
if(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
2022-09-13 10:03:25 +00:00
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication &&
|
|
|
|
!!root.sharedKeycardModule.keyPairForAuthentication &&
|
|
|
|
root.sharedKeycardModule.keyPairForAuthentication.name !== "") {
|
|
|
|
if(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardInserted ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.insertKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardEmpty ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPinRetriesReached ||
|
2022-09-20 14:01:57 +00:00
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPukRetriesReached ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPairingSlotsReached ||
|
2022-09-13 10:03:25 +00:00
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsReadyToSign ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPinFailed ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPinInvalid ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.wrongKeycard) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
2022-09-21 13:11:39 +00:00
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.displayKeycardContent) {
|
|
|
|
if(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay) {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
2022-08-31 17:09:07 +00:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceComponent: {
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard) {
|
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay) {
|
|
|
|
if (root.sharedKeycardModule.keyPairStoredOnKeycardIsKnown) {
|
|
|
|
return knownKeyPairComponent
|
|
|
|
}
|
|
|
|
return unknownKeyPairCompontnt
|
|
|
|
}
|
|
|
|
if ((root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.pluginReader && !d.hideKeyPair) ||
|
|
|
|
(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.insertKeycard && !d.hideKeyPair) ||
|
|
|
|
(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardInserted && !d.hideKeyPair) ||
|
|
|
|
(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard && !d.hideKeyPair) ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.recognizedKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keyPairMigrateSuccess ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keyPairMigrateFailure) {
|
|
|
|
return keyPairComponent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.factoryReset) {
|
|
|
|
if(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay) {
|
|
|
|
if (root.sharedKeycardModule.keyPairStoredOnKeycardIsKnown) {
|
|
|
|
return knownKeyPairComponent
|
|
|
|
}
|
|
|
|
return unknownKeyPairCompontnt
|
|
|
|
}
|
|
|
|
}
|
2022-09-13 10:03:25 +00:00
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication) {
|
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardInserted ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.insertKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardEmpty ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPinRetriesReached ||
|
2022-09-20 14:01:57 +00:00
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPukRetriesReached ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPairingSlotsReached ||
|
2022-09-13 10:03:25 +00:00
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsReadyToSign ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPinFailed ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPinInvalid ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.wrongKeycard) {
|
|
|
|
return keyPairForAuthenticationComponent
|
|
|
|
}
|
|
|
|
}
|
2022-09-21 13:11:39 +00:00
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.displayKeycardContent) {
|
|
|
|
if(root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay) {
|
|
|
|
if (root.sharedKeycardModule.keyPairStoredOnKeycardIsKnown) {
|
|
|
|
return knownKeyPairComponent
|
|
|
|
}
|
|
|
|
return unknownKeyPairCompontnt
|
|
|
|
}
|
|
|
|
}
|
2022-09-13 10:03:25 +00:00
|
|
|
|
|
|
|
return undefined
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
visible: !loader.active
|
|
|
|
Layout.fillWidth: true
|
2022-09-02 11:04:59 +00:00
|
|
|
Layout.fillHeight: visible
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
states: [
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.pluginReader
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.pluginReader
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Plug in Keycard reader...")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-08-31 17:09:07 +00:00
|
|
|
source: Style.png("keycard/empty-reader")
|
|
|
|
pattern: ""
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.insertKeycard
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.insertKeycard
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Insert Keycard...")
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-08-31 17:09:07 +00:00
|
|
|
pattern: "keycard/card_insert/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 16
|
|
|
|
duration: 1000
|
|
|
|
loops: 1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
2022-08-31 17:09:07 +00:00
|
|
|
text: root.sharedKeycardModule.keycardData & Constants.predefinedKeycardData.wronglyInsertedCard?
|
|
|
|
qsTr("Check the card, it might be wrongly inserted") :
|
|
|
|
""
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
2022-08-12 07:33:12 +00:00
|
|
|
color: Theme.palette.baseColor1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
},
|
2022-08-31 17:09:07 +00:00
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keycardInserted
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardInserted
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Keycard inserted...")
|
|
|
|
font.weight: Font.Bold
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/card_inserted/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 29
|
|
|
|
duration: 1000
|
|
|
|
loops: 1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
2022-08-05 13:50:54 +00:00
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.readingKeycard
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.readingKeycard
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Reading Keycard...")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-08-31 17:09:07 +00:00
|
|
|
pattern: "keycard/warning/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 55
|
|
|
|
duration: 3000
|
|
|
|
loops: 1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.notKeycard
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.notKeycard
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("This is not a Keycard")
|
2022-08-31 17:09:07 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
2022-08-05 13:50:54 +00:00
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-09-13 10:03:25 +00:00
|
|
|
pattern: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication?
|
|
|
|
"" : "keycard/strong_error/img-%1"
|
|
|
|
source: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication?
|
|
|
|
Style.png("keycard/plain-error") : ""
|
2022-08-31 17:09:07 +00:00
|
|
|
startImgIndexForTheFirstLoop: 0
|
2022-09-13 10:03:25 +00:00
|
|
|
startImgIndexForOtherLoops: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication?
|
|
|
|
0 : 18
|
|
|
|
endImgIndex: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication?
|
|
|
|
0 : 29
|
|
|
|
duration: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication?
|
|
|
|
0 : 1300
|
2022-08-31 17:09:07 +00:00
|
|
|
loops: -1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("The card inserted is not a recognised Keycard,\nplease remove and try and again")
|
2022-08-31 17:09:07 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
},
|
2022-09-13 10:03:25 +00:00
|
|
|
State {
|
2022-09-20 14:01:57 +00:00
|
|
|
name: Constants.keycardSharedState.unlockKeycardOptions
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.unlockKeycardOptions
|
2022-09-13 10:03:25 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
2022-09-20 14:01:57 +00:00
|
|
|
text: qsTr("Unlock this Keycard")
|
2022-09-13 10:03:25 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
2022-09-20 14:01:57 +00:00
|
|
|
color: Theme.palette.directColor1
|
2022-09-13 10:03:25 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-09-20 14:01:57 +00:00
|
|
|
pattern: "keycard/strong_error/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 18
|
|
|
|
endImgIndex: 29
|
|
|
|
duration: 1300
|
|
|
|
loops: -1
|
2022-09-13 10:03:25 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
2022-09-20 14:01:57 +00:00
|
|
|
text: ""
|
2022-09-13 10:03:25 +00:00
|
|
|
}
|
|
|
|
},
|
2022-08-31 17:09:07 +00:00
|
|
|
State {
|
2022-09-20 14:01:57 +00:00
|
|
|
name: Constants.keycardSharedState.wrongKeycard
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.wrongKeycard
|
2022-08-31 17:09:07 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
2022-09-20 14:01:57 +00:00
|
|
|
text: qsTr("Wrong Keycard inserted")
|
2022-08-31 17:09:07 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-09-20 14:01:57 +00:00
|
|
|
source: Style.png("keycard/plain-error")
|
|
|
|
pattern: ""
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
2022-10-11 12:15:33 +00:00
|
|
|
text: {
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.authentication) {
|
|
|
|
return qsTr("Keycard inserted does not match the Keycard below")
|
|
|
|
}
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.unlockKeycard) {
|
|
|
|
return qsTr("Keycard inserted does not match the Keycard you're trying to unlock")
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
2022-08-31 17:09:07 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
2022-08-05 13:50:54 +00:00
|
|
|
color: Theme.palette.dangerColor1
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keycardEmptyMetadata
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardEmptyMetadata
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("This Keycard has empty metadata")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/card-inserted")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("This Keycard already stores keys\nbut doesn't store any metadata")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
color: Theme.palette.directColor1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keycardEmpty
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardEmpty
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Keycard is empty")
|
2022-08-31 17:09:07 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
2022-08-05 13:50:54 +00:00
|
|
|
font.weight: Font.Bold
|
2022-09-20 14:01:57 +00:00
|
|
|
color: Theme.palette.directColor1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-09-20 14:01:57 +00:00
|
|
|
source: Style.png("keycard/card-empty")
|
2022-08-31 17:09:07 +00:00
|
|
|
pattern: ""
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("There is no key pair on this Keycard")
|
2022-08-31 17:09:07 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
2022-09-20 14:01:57 +00:00
|
|
|
color: Theme.palette.directColor1
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keycardNotEmpty
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardNotEmpty
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("This Keycard already stores keys")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/card-inserted")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard?
|
|
|
|
qsTr("To migrate %1 on to this Keycard, you\nwill need to perform a factory reset first")
|
|
|
|
.arg(root.sharedKeycardModule.selectedKeyPairItem.name) :
|
|
|
|
""
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
2022-08-05 13:50:54 +00:00
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
},
|
2022-09-13 10:03:25 +00:00
|
|
|
State {
|
2022-09-20 14:01:57 +00:00
|
|
|
name: "sharedLockedState"
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPinRetriesReached ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPukRetriesReached ||
|
|
|
|
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPairingSlotsReached
|
2022-09-13 10:03:25 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
2022-09-20 14:01:57 +00:00
|
|
|
text: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard?
|
|
|
|
qsTr("Keycard locked and already stores keys") : qsTr("Keycard locked")
|
2022-09-13 10:03:25 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
2022-09-20 14:01:57 +00:00
|
|
|
color: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard?
|
|
|
|
Theme.palette.directColor1 : Theme.palette.dangerColor1
|
2022-09-13 10:03:25 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/strong_error/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 18
|
|
|
|
endImgIndex: 29
|
|
|
|
duration: 1300
|
|
|
|
loops: -1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
2022-09-20 14:01:57 +00:00
|
|
|
text: {
|
2022-09-21 13:11:39 +00:00
|
|
|
if (root.sharedKeycardModule.keycardData & Constants.predefinedKeycardData.useGeneralMessageForLockedState) {
|
|
|
|
if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard)
|
|
|
|
return qsTr("The Keycard you have inserted is locked,\nyou will need to factory reset it before proceeding")
|
2022-09-20 14:01:57 +00:00
|
|
|
return qsTr("You will need to unlock it before proceeding")
|
2022-09-21 13:11:39 +00:00
|
|
|
}
|
2022-09-20 14:01:57 +00:00
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPinRetriesReached)
|
|
|
|
return qsTr("Pin entered incorrectly too many times")
|
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPukRetriesReached)
|
|
|
|
return qsTr("Puk entered incorrectly too many times")
|
|
|
|
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.maxPairingSlotsReached)
|
|
|
|
return qsTr("Max pairing slots reached for the entered keycard")
|
|
|
|
return ""
|
|
|
|
}
|
2022-09-13 10:03:25 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
2022-09-20 14:01:57 +00:00
|
|
|
color: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard?
|
|
|
|
Theme.palette.directColor1 : Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keycardAlreadyUnlocked
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardAlreadyUnlocked
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Your Keycard is already unlocked!")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/success/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 29
|
|
|
|
duration: 1300
|
|
|
|
loops: 1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.unlockKeycardSuccess
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.unlockKeycardSuccess
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Unlock successful")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
2022-09-13 10:03:25 +00:00
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
2022-09-20 14:01:57 +00:00
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/strong_success/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 20
|
|
|
|
duration: 1000
|
|
|
|
loops: 1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
2022-09-13 10:03:25 +00:00
|
|
|
},
|
2022-08-05 13:50:54 +00:00
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.recognizedKeycard
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.recognizedKeycard
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Keycard recognized")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
font.weight: Font.Normal
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-08-31 17:09:07 +00:00
|
|
|
pattern: "keycard/success/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 29
|
|
|
|
duration: 1300
|
|
|
|
loops: 1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.factoryResetSuccess
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.factoryResetSuccess
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
2022-08-31 17:09:07 +00:00
|
|
|
text: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard?
|
|
|
|
qsTr("Your Keycard has been reset") :
|
|
|
|
qsTr("Keycard successfully factory reset")
|
2022-08-05 13:50:54 +00:00
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
2022-08-31 17:09:07 +00:00
|
|
|
pattern: "keycard/strong_success/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 20
|
|
|
|
duration: 1000
|
|
|
|
loops: 1
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
2022-08-31 17:09:07 +00:00
|
|
|
text: root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.setupNewKeycard?
|
|
|
|
qsTr("You can now create a new key pair on this Keycard") :
|
|
|
|
qsTr("You can now use this Keycard as if it\nwas a brand new empty Keycard")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
2022-08-05 13:50:54 +00:00
|
|
|
color: Theme.palette.directColor1
|
2022-08-31 17:09:07 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.migratingKeyPair
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.migratingKeyPair
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Migrating key pair to Keycard")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/warning/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 55
|
|
|
|
duration: 3000
|
|
|
|
loops: -1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keyPairMigrateSuccess
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keyPairMigrateSuccess
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Key pair successfully migrated")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/strong_success/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 0
|
|
|
|
endImgIndex: 20
|
|
|
|
duration: 1000
|
|
|
|
loops: 1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("To complete migration close Status and log in with your new Keycard")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keyPairMigrateFailure
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keyPairMigrateFailure
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Key pair failed to migrated")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
pattern: "keycard/strong_error/img-%1"
|
|
|
|
source: ""
|
|
|
|
startImgIndexForTheFirstLoop: 0
|
|
|
|
startImgIndexForOtherLoops: 18
|
|
|
|
endImgIndex: 29
|
|
|
|
duration: 1300
|
|
|
|
loops: 1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.keycardMetadataDisplay
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Accounts on this Keycard")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/card-inserted")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
2022-09-13 10:03:25 +00:00
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.biometricsReadyToSign
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsReadyToSign
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Ready to authenticate...")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/card-inserted")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.biometricsPasswordFailed
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPasswordFailed
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/biometrics-fail")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Biometric scan failed")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("Biometrics incorrect")
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.biometricsPinFailed
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPinFailed
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/plain-error")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Biometric scan failed")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
|
|
|
text: qsTr("Biometrics incorrect")
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
State {
|
|
|
|
name: Constants.keycardSharedState.biometricsPinInvalid
|
|
|
|
when: root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.biometricsPinInvalid
|
|
|
|
PropertyChanges {
|
|
|
|
target: image
|
|
|
|
source: Style.png("keycard/plain-error")
|
|
|
|
pattern: ""
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: title
|
|
|
|
text: qsTr("Biometric pin invalid")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize1
|
|
|
|
font.weight: Font.Bold
|
|
|
|
color: Theme.palette.dangerColor1
|
|
|
|
}
|
|
|
|
PropertyChanges {
|
|
|
|
target: message
|
2022-09-23 13:53:13 +00:00
|
|
|
text: qsTr("The PIN length doesn't match Keycard's PIN length")
|
|
|
|
font.pixelSize: Constants.keycard.general.fontSize2
|
|
|
|
color: Theme.palette.baseColor1
|
2022-09-13 10:03:25 +00:00
|
|
|
}
|
2022-08-05 13:50:54 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|