summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/Export.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-12-08 15:35:03 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-12 21:35:55 -0500
commit080ddc0df2858954e2412101250885652c4a40e2 (patch)
tree915e97cef6a5778ef9ccd942965bddfa09b45efc /mobile-widgets/qml/Export.qml
parent53069fe777f123697f6d7d06e1f86ebbd5366b40 (diff)
downloadsubsurface-080ddc0df2858954e2412101250885652c4a40e2.tar.gz
mobile/qml: Integrate/activate diveshare in Export
Integrate diveshare in Export Activate diveshare radio button Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'mobile-widgets/qml/Export.qml')
-rw-r--r--mobile-widgets/qml/Export.qml24
1 files changed, 20 insertions, 4 deletions
diff --git a/mobile-widgets/qml/Export.qml b/mobile-widgets/qml/Export.qml
index 547da8ec4..097893b60 100644
--- a/mobile-widgets/qml/Export.qml
+++ b/mobile-widgets/qml/Export.qml
@@ -59,6 +59,11 @@ Kirigami.ScrollablePage {
Qt.ImhNoAutoUppercase
echoMode: TextInput.PasswordEchoOnEdit
}
+ CheckBox {
+ id: fieldPrivate
+ Layout.fillWidth: true
+ text: qsTr("Private")
+ }
ProgressBar {
id: progress
value: 0.0
@@ -79,10 +84,14 @@ Kirigami.ScrollablePage {
}
if (fieldPassword.text !== PrefCloudStorage.divelogde_pass)
PrefCloudStorage.divelogde_pass = fieldPassword.text
+ manager.exportToWEB(selectedExport, fieldUserID.text, fieldPassword.text, anonymize.checked)
} else {
- // TO BE IMPLEMENTED
+ if (fieldUserID.text !== PrefCloudStorage.diveshare_uid) {
+ PrefCloudStorage.diveshare_uid = fieldUserID.text
+ }
+ PrefCloudStorage.diveshare_private = fieldPrivate.checked
+ manager.exportToWEB(selectedExport, fieldUserID.text, fieldPassword.text, fieldPrivate.checked)
}
- manager.exportToWEB(selectedExport, fieldUserID.text, fieldPassword.text, anonymize.checked)
}
onRejected: {
pageStack.pop()
@@ -150,7 +159,6 @@ Kirigami.ScrollablePage {
}
RadioButton {
Layout.fillWidth: true
- visible: false // TEMPORARY MEASURE, until non UI related WEB service is ready
text: qsTr("Upload DiveShare")
exclusiveGroup: radioGroup
onClicked: {
@@ -253,9 +261,17 @@ Kirigami.ScrollablePage {
fieldPassword.text = PrefCloudStorage.divelogde_pass
anonymize.visible = false
statusText.text = ""
+ fieldPrivate.visible = false
uploadDialog.open()
} else if (selectedExport === ExportType.EX_DIVESHARE) {
- // TO BE IMPLEMENTED
+ textUserID.visible = true
+ fieldUserID.visible = true
+ fieldUserID.text = PrefCloudStorage.diveshare_uid
+ fieldPrivate.visible = true
+ fieldPrivate.checked = PrefCloudStorage.diveshare_private
+ textPassword.visible = false
+ fieldPassword.visible = false
+ uploadDialog.open()
} else {
saveAsDialog.open()
}