mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue