aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/DiveList.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qml/DiveList.qml')
-rw-r--r--qt-mobile/qml/DiveList.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveList.qml b/qt-mobile/qml/DiveList.qml
index 403cb6846..298680682 100644
--- a/qt-mobile/qml/DiveList.qml
+++ b/qt-mobile/qml/DiveList.qml
@@ -184,13 +184,37 @@ MobileComponents.Page {
}
}
}
+
+ property QtObject saveAction: Action {
+ iconName: "document-save"
+ onTriggered: {
+ startPage.saveCredentials();
+ }
+ }
+
+ onBackRequested: {
+ if (diveListView.count > 0 && manager.credentialStatus != QMLManager.INVALID) {
+ manager.credentialStatus = oldStatus
+ }
+ event.accepted = true;
+ }
+
ScrollView {
id: startPageWrapper
anchors.fill: parent
opacity: (diveListView.count > 0 && (credentialStatus == QMLManager.VALID || credentialStatus == QMLManager.VALID_EMAIL)) ? 0 : 1
visible: opacity > 0
Behavior on opacity { NumberAnimation { duration: MobileComponents.Units.shortDuration } }
+ onVisibleChanged: {
+ if (visible) {
+ page.mainAction = page.saveAction
+ } else {
+ page.mainAction = null
+ }
+ }
+
StartPage {
+ id: startPage
}
}
}