summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-20 06:56:01 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-20 15:25:16 -0700
commit5d1fbbe57bd9b21bdd4124f8361aa6b22b9d9aad (patch)
tree200d3085de30f7f2412964ed8274ec422c8adcd6 /mobile-widgets
parent0fcf67ca55f9ea45b826fb343736056a8d476266 (diff)
downloadsubsurface-5d1fbbe57bd9b21bdd4124f8361aa6b22b9d9aad.tar.gz
QML UI: don't show add dive button without valid credentials
Given that currently we don't deal well with not having a git repository that is linked to cloud storage, don't allow people to add dives unless there are verified cloud credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveList.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index d3b72c6ea..73bb06a86 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -218,9 +218,12 @@ Kirigami.ScrollablePage {
if (visible) {
page.actions.main = page.saveAction
title = "Cloud credentials"
- } else {
+ } else if(manager.credentialStatus === QMLManager.VALID || manager.credentialStatus === QMLManager.VALID_EMAIL) {
page.actions.main = page.addDiveAction
title = "Dive list"
+ } else {
+ page.actions.main = null
+ title = "Dive list"
}
}