mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
093813698c
commit
117aa13dbe
1 changed files with 45 additions and 1 deletions
|
@ -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 {
|
||||
width: parent.width
|
||||
spacing: 1
|
||||
|
@ -165,7 +209,7 @@ Kirigami.ScrollablePage {
|
|||
onClicked: {
|
||||
if (selectedExport === ExportType.EX_DIVELOGS_DE ||
|
||||
selectedExport === ExportType.EX_DIVESHARE) {
|
||||
console.log("Upload TO BE DONE, You chose: " + selectedExport)
|
||||
uploadDialog.open()
|
||||
} else {
|
||||
saveAsDialog.open()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue