AusweisApp2/resources/qml/Governikus/IdentifyView/+android/+tablet/IdentifyViewContent.qml

158 lines
3.9 KiB
QML
Raw Normal View History

2017-07-03 09:30:10 +02:00
import QtQuick 2.5
2017-12-20 14:54:05 +01:00
import Governikus.Global 1.0
import Governikus.Provider 1.0
2017-07-03 09:33:28 +02:00
2017-07-03 09:30:10 +02:00
Item {
2017-07-03 09:33:28 +02:00
id: root
height: infoPane.height + 2 * Constants.component_spacing
2017-07-03 09:30:10 +02:00
Column {
2017-07-03 09:33:28 +02:00
id: infoPane
2017-07-03 09:30:10 +02:00
anchors.top: parent.top
anchors.left: parent.left
2017-07-03 09:33:28 +02:00
anchors.right: parent.right
anchors.margins: Constants.component_spacing
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
spacing: Constants.pane_spacing
2017-07-03 09:30:10 +02:00
2017-12-20 14:54:05 +01:00
Text {
font.pixelSize: Constants.normal_font_size
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("You are about to identify yourself towards the following service provider:") + settingsModel.translationTrigger
}
2017-07-03 09:33:28 +02:00
Pane {
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
Row {
height: providerEntries.height
width: parent.width
spacing: Constants.pane_spacing
Item {
height: providerEntries.height
width: (parent.width - Constants.pane_spacing) / 2
Column {
id: providerEntries
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
spacing: Constants.pane_spacing
ProviderInfoSection {
imageSource: "qrc:///images/provider/information.svg"
2017-12-20 14:54:05 +01:00
title: qsTr("Service provider") + settingsModel.translationTrigger
2017-07-03 09:33:28 +02:00
name: certificateDescriptionModel.subjectName
}
ProviderInfoSection {
imageSource: "qrc:///images/provider/purpose.svg"
2017-12-20 14:54:05 +01:00
title: qsTr("Purpose for reading out requested data") + settingsModel.translationTrigger
2017-07-03 09:33:28 +02:00
name: certificateDescriptionModel.purpose
}
}
MouseArea {
anchors.fill: parent
2017-12-20 14:54:05 +01:00
onClicked: firePush(certificateDescriptionPage, {})
2017-07-03 09:33:28 +02:00
}
CertificateDescriptionPage {
id: certificateDescriptionPage
name: certificateDescriptionModel.subjectName
visible: false
}
}
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
Item {
height: parent.height
width: (parent.width - Constants.pane_spacing) / 2
2017-12-20 14:54:05 +01:00
GButton {
2017-07-03 09:33:28 +02:00
id: button
2017-12-20 14:54:05 +01:00
iconSource: "qrc:///images/npa.svg"
2017-07-03 09:33:28 +02:00
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
2017-12-20 14:54:05 +01:00
buttonColor: applicationModel.currentWorkflow === "" && settingsModel.useSelfauthenticationTestUri ? Constants.red : Constants.blue
2017-07-03 09:33:28 +02:00
2017-12-20 14:54:05 +01:00
text: qsTr("Identify now") + settingsModel.translationTrigger
2017-07-03 09:33:28 +02:00
onClicked: {
if (applicationModel.currentWorkflow === "") {
selfAuthenticationModel.startWorkflow();
}
else if (applicationModel.currentWorkflow === "authentication") {
chatModel.transferAccessRights()
numberModel.continueWorkflow()
}
}
}
2017-07-03 09:30:10 +02:00
}
}
}
2017-12-20 14:54:05 +01:00
Text {
font.pixelSize: Constants.normal_font_size
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("The following data will be transferred to the service provider when you enter the PIN:") + settingsModel.translationTrigger
}
2017-07-03 09:30:10 +02:00
Pane {
2017-07-03 09:33:28 +02:00
Column {
height: childrenRect.height
width: parent.width
spacing: Utils.dp(30)
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
Column {
id: transactionInfo
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
width: parent.width
visible: !!transactionInfoText.text
Text {
height: implicitHeight * 1.5
verticalAlignment: Text.AlignTop
2017-12-20 14:54:05 +01:00
text: qsTr("Transactional information") + settingsModel.translationTrigger
2017-07-03 09:33:28 +02:00
color: Constants.blue
font.pixelSize: Constants.header_font_size
elide: Text.ElideRight
}
Text {
id: transactionInfoText
width: parent.width
font.pixelSize: Constants.normal_font_size
text: authModel.transactionInfo
wrapMode: Text.WordWrap
}
}
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
Row {
width: parent.width
spacing: Constants.pane_spacing
2017-07-03 09:30:10 +02:00
2017-07-03 09:33:28 +02:00
DataGroup {
id: requiredData
width: optionalData.visible ? parent.width * 0.63 : parent.width
2017-07-03 09:30:10 +02:00
2017-12-20 14:54:05 +01:00
title: qsTr("Required Data") + settingsModel.translationTrigger
2017-07-03 09:33:28 +02:00
columns: optionalData.visible ? 2 : 3
chat: chatModel.required
}
DataGroup {
id: optionalData
width: parent.width * 0.37 - Constants.pane_spacing
2017-12-20 14:54:05 +01:00
title: qsTr("Optional Data") + settingsModel.translationTrigger
2017-07-03 09:33:28 +02:00
chat: chatModel.optional
}
2017-07-03 09:30:10 +02:00
}
}
}
}
}