summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-11-29 19:27:30 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-11 12:36:43 -0500
commit422bb0da576690da40c34c572d9c4e51baf4f730 (patch)
treea6e1e7502869b077e07d88dcdf58b0c0d12c228f /mobile-widgets/qml
parent03c9cdfbede692f0277f5bb4324455a13dfc5977 (diff)
downloadsubsurface-422bb0da576690da40c34c572d9c4e51baf4f730.tar.gz
mobile/qml: add pref suppport for userid in Export
Handle reading/writing of userid/password settings in the saveAsDialog and set field to visible when needed. Activate divelogsde radio button Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'mobile-widgets/qml')
-rw-r--r--mobile-widgets/qml/Export.qml25
1 files changed, 22 insertions, 3 deletions
diff --git a/mobile-widgets/qml/Export.qml b/mobile-widgets/qml/Export.qml
index 094749dbc..d770e21b6 100644
--- a/mobile-widgets/qml/Export.qml
+++ b/mobile-widgets/qml/Export.qml
@@ -39,6 +39,7 @@ Kirigami.ScrollablePage {
columns: 2
Text {
+ id: textUserID
text: qsTr("User ID")
}
TextField {
@@ -47,6 +48,7 @@ Kirigami.ScrollablePage {
inputMethodHints: Qt.ImhNoAutoUppercase
}
Text {
+ id: textPassword
text: qsTr("Password:")
}
TextField {
@@ -63,6 +65,16 @@ Kirigami.ScrollablePage {
}
onApply: {
+ if (selectedExport === ExportType.EX_DIVELOGS_DE) {
+ if (fieldUserID.text !== PrefCloudStorage.divelogde_user) {
+
+ PrefCloudStorage.divelogde_user = fieldUserID.text
+ }
+ if (fieldPassword.text !== PrefCloudStorage.divelogde_pass)
+ PrefCloudStorage.divelogde_pass = fieldPassword.text
+ } else {
+ // TO BE IMPLEMENTED
+ }
manager.exportToWEB(selectedExport, fieldUserID.text, fieldPassword.text, anonymize.checked)
close()
}
@@ -108,7 +120,6 @@ Kirigami.ScrollablePage {
}
RadioButton {
Layout.fillWidth: true
- visible: false // TEMPORARY MEASURE, until non UI related WEB service is ready
text: qsTr("Upload divelogs.de")
exclusiveGroup: radioGroup
onClicked: {
@@ -212,9 +223,17 @@ Kirigami.ScrollablePage {
SsrfButton {
text: qsTr("Next")
onClicked: {
- if (selectedExport === ExportType.EX_DIVELOGS_DE ||
- selectedExport === ExportType.EX_DIVESHARE) {
+ if (selectedExport === ExportType.EX_DIVELOGS_DE) {
+ textUserID.visible = true
+ fieldUserID.visible = true
+ fieldUserID.text = PrefCloudStorage.divelogde_user
+ textPassword.visible = true
+ fieldPassword.visible = true
+ fieldPassword.text = PrefCloudStorage.divelogde_pass
+ anonymize.visible = false
uploadDialog.open()
+ } else if (selectedExport === ExportType.EX_DIVESHARE) {
+ // TO BE IMPLEMENTED
} else {
saveAsDialog.open()
}