QML UI: show an empty dive list with explanation
If the credentials are valid we should show the dive list. If there are no dives, simply say so. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3f26de826a
commit
0d986b9cfd
@ -212,7 +212,7 @@ Kirigami.ScrollablePage {
|
||||
ScrollView {
|
||||
id: startPageWrapper
|
||||
anchors.fill: parent
|
||||
opacity: credentialStatus === QMLManager.NOCLOUD || (diveListView.count > 0 && (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL)) ? 0 : 1
|
||||
opacity: credentialStatus === QMLManager.NOCLOUD || (credentialStatus === QMLManager.VALID || credentialStatus === QMLManager.VALID_EMAIL) ? 0 : 1
|
||||
visible: opacity > 0
|
||||
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
|
||||
onVisibleChanged: {
|
||||
@ -273,6 +273,11 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Label {
|
||||
text: qsTr("No dives in dive list")
|
||||
visible: diveListView.visible && diveListView.count === 0
|
||||
}
|
||||
|
||||
property QtObject addDiveAction: Action {
|
||||
iconName: "list-add"
|
||||
onTriggered: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user