Commit 96eb5982 authored by Martin Straka's avatar Martin Straka

Added records management settings page.

parent 651d69ed
......@@ -77,6 +77,7 @@ ApplicationWindow {
property Component pageMessageDetail: PageMessageDetail {}
property Component pageMessageList: PageMessageList {}
property Component pageMessageSearch: PageMessageSearch {}
property Component pageRecordsManagementSettings: PageRecordsManagementSettings {}
property Component pageSendMessage: PageSendMessage {}
property Component pageSettingsAccount: PageSettingsAccount {}
property Component pageSettingsGeneral: PageSettingsGeneral {}
......
......@@ -105,6 +105,12 @@ Component {
"accountModel": accountModel
}, StackView.Immediate)
},
"settRecMan": function callSettRecMan() {
pageView.replace(pageRecordsManagementSettings, {
"pageView": pageView,
"statusBar": statusBar
}, StackView.Immediate)
},
"userGuide": function callUserGuide() {
Qt.openUrlExternally("https://secure.nic.cz/files/datove_schranky/redirect/mobile-manual.html")
pageView.pop(StackView.Immediate)
......@@ -162,6 +168,13 @@ Component {
name: qsTr("Security and PIN")
funcName: "settSecPin"
}
ListElement {
image: "qrc:/ui/briefcase.svg"
showEntry: true
showNext: true
name: qsTr("Records management")
funcName: "settRecMan"
}
ListElement {
image: "qrc:/ui/information.svg"
showEntry: true
......
/*
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
* OpenSSL library under certain conditions as described in each
* individual source file, and distribute linked combinations including
* the two.
*/
import QtQuick 2.7
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import cz.nic.mobileDatovka 1.0
Item {
id: pageRecordsManagementSettings
/* These properties must be set by caller. */
property var pageView
property var statusBar
Component.onCompleted: {
}
PageHeader {
id: headerBar
title: qsTr("Records management settings")
onBackClicked: {
pageView.pop(StackView.Immediate)
}
Row {
anchors.verticalCenter: parent.verticalCenter
spacing: defaultMargin
anchors.right: parent.right
anchors.rightMargin: defaultMargin
AccessibleImageButton {
id: acceptElement
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeightHeader
source: "qrc:/ui/checkbox-marked-circle.svg"
accessibleName: qsTr("Accept changes")
}
}
} // PageHeader
Flickable {
id: flickable
z: 0
anchors.top: headerBar.bottom
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
contentHeight: flickContent.implicitHeight
Pane {
id: flickContent
anchors.fill: parent
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
AccessibleText {
color: datovkaPalette.mid
wrapMode: Text.Wrap
horizontalAlignment: Text.AlignHCenter
width: parent.width
text: qsTr("Please fill service url, identification token and click button 'Get service info'")
}
AccessibleText {
color: datovkaPalette.text
text: qsTr("URL")
}
TextField {
id: urlTextField
width: parent.width
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter url")
InputLineMenu {
id: urlMenu
inputTextControl: urlTextField
isPassword: false
}
onPressAndHold: {
if (settings.useExplicitClipboardOperations()) {
urlMenu.implicitWidth = computeMenuWidth(urlMenu)
urlMenu.open()
}
}
}
AccessibleText {
color: datovkaPalette.text
text: qsTr("Token")
}
TextField {
id: tokenTextField
width: parent.width
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter token")
InputLineMenu {
id: tokenMenu
inputTextControl: tokenTextField
isPassword: false
}
onPressAndHold: {
if (settings.useExplicitClipboardOperations()) {
tokenMenu.implicitWidth = computeMenuWidth(tokenMenu)
tokenMenu.open()
}
}
}
Row {
spacing: formItemVerticalSpacing * 5
anchors.horizontalCenter: parent.horizontalCenter
AccessibleButton {
id: info
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: qsTr("Get service info")
onClicked: {
// TODO - connect to service
}
}
AccessibleButton {
id: clear
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: qsTr("Clear")
onClicked: {
// TODO - delete records from settings
urlTextField.clear()
tokenTextField.clear()
serviceInfo1.visible = false
serviceInfo2.visible = false
}
}
} // Row
Row {
id: serviceInfo1
spacing: formItemVerticalSpacing
visible: false
AccessibleText {
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: qsTr("Service name:")
}
AccessibleText {
id: serviceName
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: "Service"
}
} // Row
Row {
id: serviceInfo2
spacing: formItemVerticalSpacing
visible: false
AccessibleText {
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: qsTr("Token name:")
}
AccessibleText {
id: tokenName
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
text: "Token"
}
} // Row
} // Column layout
} // Pane
ScrollIndicator.vertical: ScrollIndicator {}
} // Flickable
} // Item
......@@ -44,6 +44,7 @@
<file>ui/blank.svg</file>
<file>ui/bookmark-check.svg</file>
<file>ui/book-open.svg</file>
<file>ui/briefcase.svg</file>
<file>ui/call-split.svg</file>
<file>ui/close-octagon.svg</file>
<file>ui/content-save.svg</file>
......@@ -140,6 +141,7 @@
<file>../qml/pages/PageMessageDetail.qml</file>
<file>../qml/pages/PageMessageList.qml</file>
<file>../qml/pages/PageMessageSearch.qml</file>
<file>../qml/pages/PageRecordsManagementSettings.qml</file>
<file>../qml/pages/PageSendMessage.qml</file>
<file>../qml/pages/PageSettingsAccount.qml</file>
<file>../qml/pages/PageSettingsGeneral.qml</file>
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Generated by IcoMoon.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<path fill="#000000" d="M15 4h-4v-1c0-0.55-0.45-1-1-1h-4c-0.55 0-1 0.45-1 1v1h-4c-0.55 0-1 0.45-1 1v9c0 0.55 0.45 1 1 1h14c0.55 0 1-0.45 1-1v-9c0-0.55-0.45-1-1-1zM6 3.002c0.001-0.001 0.001-0.001 0.002-0.002h3.996c0.001 0.001 0.001 0.001 0.002 0.002v0.998h-4v-0.998zM15 8h-2v1.5c0 0.275-0.225 0.5-0.5 0.5h-1c-0.275 0-0.5-0.225-0.5-0.5v-1.5h-6v1.5c0 0.275-0.225 0.5-0.5 0.5h-1c-0.275 0-0.5-0.225-0.5-0.5v-1.5h-2v-1h14v1z"></path>
</svg>
......@@ -109,6 +109,7 @@ const struct QmlTypeEntry qmlPages[] = {
{ "PageMessageDetail", 1, 0 },
{ "PageMessageList", 1, 0 },
{ "PageMessageSearch", 1, 0 },
{ "PageRecordsManagementSettings", 1, 0 },
{ "PageSendMessage", 1, 0 },
{ "PageSettingsAccount", 1, 0 },
{ "PageSettingsGeneral", 1, 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment