AusweisApp2/resources/qml/Governikus/IdentifyView/IdentifyView.qml

115 lines
4.2 KiB
QML
Raw Normal View History

2017-12-20 14:54:05 +01:00
import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2
import QtQuick.Controls.Styles 1.4
import Governikus.EnterPinView 1.0
import Governikus.Global 1.0
import Governikus.TitleBar 1.0
import Governikus.ProgressView 1.0
import Governikus.ResultView 1.0
SectionPage
{
id: identifyEditChatView
leftTitleBarAction: TitleBarAction {
state: applicationModel.currentWorkflow === "authentication" ? "cancel" : ""
onClicked: authModel.cancelWorkflow()
}
headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true }
2018-03-28 15:10:51 +02:00
content: IdentifyViewInfo {
id: identifyViewInfo
2017-12-20 14:54:05 +01:00
width: identifyEditChatView.width
2018-03-28 15:10:51 +02:00
height: identifyEditChatView.height
2017-12-20 14:54:05 +01:00
}
IdentifyController {
id: identifyController
}
2018-03-28 15:10:51 +02:00
IdentifyViewContent {
id: identifyViewContent
visible: false
}
2017-12-20 14:54:05 +01:00
SelfAuthenticationData {
id: selfAuthenticationData
visible: false
}
IdentifyWorkflow {
id: identifyWorkflow
visible: false
}
EnterPinView {
id: enterPinView
leftTitleBarAction: TitleBarAction { state: "cancel"; onClicked: authModel.cancelWorkflow() }
headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger }
visible: false
onPinEntered: {
numberModel.continueWorkflow()
firePush(identifyProgressView, {})
}
}
ProgressView {
id: identifyProgressView
state: identifyWorkflow.state
leftTitleBarAction: TitleBarAction { state: authModel.isBasicReader ? "cancel" : "hidden"; onClicked: authModel.cancelWorkflow() }
headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true }
visible: false
2018-03-28 15:10:51 +02:00
text: qsTr("Authentication in progress") + settingsModel.translationTrigger
2017-12-20 14:54:05 +01:00
subText: (!visible ? "" :
authModel.isBasicReader ?
qsTr("Please wait a moment...") :
!!numberModel.inputError ?
numberModel.inputError :
numberModel.pinDeactivated ?
qsTr("The online identification function of your ID card is deactivated. Please contact the authority responsible for issuing your identification document to activate the online identification function.") :
(state === "updateretrycounter" || state === "identify_enterpin") ?
qsTr("Please observe the display of your card reader.") :
(state === "identify_entercan") ?
qsTr("You have entered the wrong PIN twice. Prior to a third attempt, you have to enter your six-digit card access number first. You can find your card access number on the front of your ID card.") :
(state === "enterpuk") ?
qsTr("You have entered a wrong PIN three times. Your PIN is now blocked. You have to enter the PUK now for unblocking.") :
qsTr("Please wait a moment...")
) + settingsModel.translationTrigger
2018-03-28 15:10:51 +02:00
subTextColor: !authModel.isBasicReader && (numberModel.inputError || numberModel.pinDeactivated || state === "identify_entercan" || state === "enterpuk") ? "red" : Constants.secondary_text
progressValue: 0
progressText: (progressValue == 0 ? "" :
progressValue == 1 ? qsTr("Service provider is being verified") :
progressValue == 2 ? qsTr("Card is being verified") :
progressValue == 3 ? qsTr("Reading data") :
progressValue == 4 ? qsTr("Sending data to service provider") :
progressValue == 5 ? qsTr("Preparing results") :
"") + settingsModel.translationTrigger
progressBarVisible: false
2017-12-20 14:54:05 +01:00
}
ProgressView {
id: checkConnectivityView
leftTitleBarAction: TitleBarAction { state: "cancel"; onClicked: authModel.cancelWorkflow() }
headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true }
visible: false
text: qsTr("No network connectivity") + settingsModel.translationTrigger
subText: qsTr("Please enable the network interface or cancel the workflow.") + settingsModel.translationTrigger
subTextColor: Constants.red
}
ResultView {
id: identifyResult
headerTitleBarAction: TitleBarAction { text: qsTr("Identify") + settingsModel.translationTrigger; font.bold: true }
isError: authModel.resultString
text: authModel.resultString
onClicked: {
numberModel.continueWorkflow()
firePopAll()
navBar.lockedAndHidden = false
}
visible: false
}
}