mobile-widgets/qml: add upload dialog to export page

divelogs.de and diveShare are web uploads, which need a special
custom dialog.

Signed-off-by: Jan Iversen <jan@casacondor.com>
This commit is contained in:
jan Iversen 2019-11-19 17:52:20 +01:00 committed by Dirk Hohndel
parent 093813698c
commit 117aa13dbe

View file

@ -26,6 +26,50 @@ Kirigami.ScrollablePage {
} }
} }
Dialog {
id: uploadDialog
title: radioGroup.current.text
standardButtons: StandardButton.Apply | StandardButton.Cancel
GridLayout {
rowSpacing: 10
columnSpacing: 10
columns: 2
Text {
text: qsTr("User ID")
}
TextField {
id: fieldUserID
Layout.fillWidth: true
inputMethodHints: Qt.ImhNoAutoUppercase
}
Text {
text: qsTr("Password:")
}
TextField {
id: fieldPassword
Layout.fillWidth: true
inputMethodHints: Qt.ImhSensitiveData |
Qt.ImhHiddenText |
Qt.ImhNoAutoUppercase
echoMode: TextInput.PasswordEchoOnEdit
}
ProgressBar {
indeterminate: true
}
}
onApply: {
manager.exportToWEB(selectedExport, fieldUserID.text, fieldPassword.text, anonymize.checked)
close()
}
onRejected: {
close()
}
}
ColumnLayout { ColumnLayout {
width: parent.width width: parent.width
spacing: 1 spacing: 1
@ -165,7 +209,7 @@ Kirigami.ScrollablePage {
onClicked: { onClicked: {
if (selectedExport === ExportType.EX_DIVELOGS_DE || if (selectedExport === ExportType.EX_DIVELOGS_DE ||
selectedExport === ExportType.EX_DIVESHARE) { selectedExport === ExportType.EX_DIVESHARE) {
console.log("Upload TO BE DONE, You chose: " + selectedExport) uploadDialog.open()
} else { } else {
saveAsDialog.open() saveAsDialog.open()
} }