From 6af77b08b2a37cdc61cded2a4b6c449485107180 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 21 Apr 2016 04:43:37 -0700 Subject: QML UI: rename menu entry for offline use That really is what it boils down to. Also removes a few stray spaces in the warning text. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mobile-widgets/qml/main.qml') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 06e691eee..372de1f27 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -150,16 +150,16 @@ Kirigami.ApplicationWindow { } } Kirigami.Action { - text: syncToCloud ? "Disable auto cloud sync" : "Enable auto cloud sync" + text: syncToCloud ? "Offline mode" : "Enable auto cloud sync" onTriggered: { syncToCloud = !syncToCloud if (!syncToCloud) { var alertText = "Turning off automatic sync to cloud causes all data\n" - alertText +=" to only be stored locally.\n" + alertText +="to only be stored locally.\n" alertText += "This can be very useful in situations with\n" - alertText += " limited or no network access.\n" + alertText += "limited or no network access.\n" alertText += "Please chose 'Manual sync with cloud' if you have network\n" - alertText += " connectivity and want to sync your data to cloud storage." + alertText += "connectivity and want to sync your data to cloud storage." showPassiveNotification(alertText, 10000) } } -- cgit v1.2.3-70-g09d2 From be30724ba0eeaba214c099921579f2023d2a9a7a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 21 Apr 2016 04:52:47 -0700 Subject: QML UI: allow switching to offline mode without valid credentials If the user wants to work offline, they don't need validated credentials. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mobile-widgets/qml/main.qml') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 372de1f27..858e9d003 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -122,7 +122,6 @@ Kirigami.ApplicationWindow { }, Kirigami.Action { text: "Manage dives" - enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL /* * disable for the beta to avoid confusion Action { @@ -135,6 +134,7 @@ Kirigami.ApplicationWindow { */ Kirigami.Action { text: "Add dive manually" + enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL onTriggered: { returnTopPage() // otherwise odd things happen with the page stack startAddDive() @@ -142,6 +142,7 @@ Kirigami.ApplicationWindow { } Kirigami.Action { text: "Manual sync with cloud" + enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL onTriggered: { globalDrawer.close() detailsWindow.endEditMode() -- cgit v1.2.3-70-g09d2 From 8946edfd922c6e3abde9d52f25e4818207a0f508 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 22 Apr 2016 05:21:26 -0700 Subject: QML UI: adapt "Manage dives" to no cloud status If we are in no cloud mode - allow adding dives via the menu - enabling / disabling automatic sync makes no sense. - if the user wants to manually sync the cloud, they need to first enter credentials. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'mobile-widgets/qml/main.qml') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 858e9d003..ad3f68e37 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -134,7 +134,7 @@ Kirigami.ApplicationWindow { */ Kirigami.Action { text: "Add dive manually" - enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL + enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD onTriggered: { returnTopPage() // otherwise odd things happen with the page stack startAddDive() @@ -142,16 +142,25 @@ Kirigami.ApplicationWindow { } Kirigami.Action { text: "Manual sync with cloud" - enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL + enabled: manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL || manager.credentialStatus === QMLManager.NOCLOUD onTriggered: { - globalDrawer.close() - detailsWindow.endEditMode() - manager.saveChangesCloud(true); - globalDrawer.close() + if (manager.credentialStatus === QMLManager.NOCLOUD) { + returnTopPage() + oldStatus = manager.credentialStatus + manager.startPageText = "Enter valid cloud storage credentials" + manager.credentialStatus = QMLManager.UNKNOWN + globalDrawer.close() + } else { + globalDrawer.close() + detailsWindow.endEditMode() + manager.saveChangesCloud(true); + globalDrawer.close() + } } } Kirigami.Action { text: syncToCloud ? "Offline mode" : "Enable auto cloud sync" + enabled: manager.credentialStatus !== QMLManager.NOCLOUD onTriggered: { syncToCloud = !syncToCloud if (!syncToCloud) { -- cgit v1.2.3-70-g09d2 From 15431f418e724c0f729dd2ffa140a0b7efda23e9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 27 Apr 2016 05:44:18 -0700 Subject: QML UI: use anchor to fill parent Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mobile-widgets/qml/main.qml') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index ad3f68e37..1927d6224 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -334,8 +334,7 @@ Kirigami.ApplicationWindow { DiveDetails { id: detailsWindow visible: false - width: parent.width - height: parent.height + anchors.fill: parent } DownloadFromDiveComputer { -- cgit v1.2.3-70-g09d2