diff options
Diffstat (limited to 'qt-mobile/qml/main.qml')
-rw-r--r-- | qt-mobile/qml/main.qml | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 675dad623..150e9769f 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -15,9 +15,10 @@ Kirigami.ApplicationWindow { property int oldStatus: -1 property alias accessingCloud: manager.accessingCloud property QtObject notification: null + property bool showingDiveList: false onAccessingCloudChanged: { if (accessingCloud) { - showPassiveNotification("Accessing Subsurface Cloud Storage", 5000); + showPassiveNotification("Accessing Subsurface Cloud Storage", 500000); } else { hidePassiveNotification(); } @@ -37,6 +38,10 @@ Kirigami.ApplicationWindow { detailsWindow.endEditMode() } + function scrollToTop() { + diveList.scrollToTop() + } + globalDrawer: Kirigami.GlobalDrawer { title: "Subsurface" titleIcon: "qrc:/qml/subsurface-mobile-icon.png" @@ -46,6 +51,14 @@ Kirigami.ApplicationWindow { Kirigami.Action { text: "Dive list" onTriggered: { + manager.appendTextToLog("requested dive list with credential status " + manager.credentialStatus) + if (manager.credentialStatus == QMLManager.UNKNOWN) { + // the user has asked to change credentials - if the credentials before that + // were valid, go back to dive list + if (oldStatus == QMLManager.VALID || oldStatus == QMLManager.VALID_EMAIL) { + manager.credentialStatus = oldStatus + } + } returnTopPage() globalDrawer.close() } @@ -58,7 +71,7 @@ Kirigami.ApplicationWindow { if (diveList.numDives > 0) { manager.startPageText = "Enter different credentials or return to dive list" } else { - manager.startPageText = "Enter valdi cloud storage credentials" + manager.startPageText = "Enter valid cloud storage credentials" } manager.credentialStatus = QMLManager.UNKNOWN @@ -103,6 +116,7 @@ Kirigami.ApplicationWindow { Kirigami.Action { text: "Refresh" onTriggered: { + globalDrawer.close() detailsWindow.endEditMode() manager.loadDives(); } @@ -110,6 +124,7 @@ Kirigami.ApplicationWindow { Action { text: "Upload to cloud" onTriggered: { + globalDrawer.close() detailsWindow.endEditMode() manager.saveChanges(); } @@ -178,13 +193,11 @@ Kirigami.ApplicationWindow { stackView.push(themetest) } } - Kirigami.Action { - checkable: true - checked: manager.verboseEnabled - text: checked ? "Disable verbose (for adb logcat)" : "Enable verbose (for adb logcat)" - onToggled: { - manager.verboseEnabled = checked; - } + }, + Kirigami.Action { + text: "User manual" + onTriggered: { + manager.showUserManual() } }, Kirigami.Action { @@ -240,8 +253,15 @@ Kirigami.ApplicationWindow { property color accentColor: "#2d5b9a" property color shadedColor: "#132744" property color accentTextColor: "#ececec" + property color diveListTextColor: Qt.rgba(0,0,0,0.76) // the Kirigami theme text color is too light property int columnWidth: Math.round(rootItem.width/(Kirigami.Units.gridUnit*30)) > 0 ? Math.round(rootItem.width / Math.round(rootItem.width/(Kirigami.Units.gridUnit*30))) : rootItem.width } +/* + toolBar: TopBar { + width: parent.width + height: Layout.minimumHeight + } + */ property Item stackView: pageStack pageStack.initialPage: DiveList { |