summaryrefslogtreecommitdiff
path: root/contents
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2023-07-24 21:14:52 +0800
committerFrederick Yin <fkfd@fkfd.me>2023-07-24 21:14:52 +0800
commit339ba914bf3f61d248b75af7ff6b965cfe8b3992 (patch)
tree896a887f52c8611e8dea4778c6187fe325ae7d39 /contents
parentd8b106f41292f9dff35e45732edff625d3926581 (diff)
Add placeholder when lists are empty
Diffstat (limited to 'contents')
-rw-r--r--contents/ui/main.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/contents/ui/main.qml b/contents/ui/main.qml
index b49996d..006e81b 100644
--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -231,6 +231,14 @@ Item {
spacing: PlasmaCore.Units.smallSpacing
delegate: ActivityView {}
model: announcementsModel
+
+ PlasmaExtras.PlaceholderMessage {
+ anchors.centerIn: parent
+ width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
+ visible: announcementsModel.count == 0
+ iconName: "mail-read-symbolic"
+ text: "No announcements"
+ }
}
}
@@ -269,6 +277,14 @@ Item {
spacing: PlasmaCore.Units.gridUnit
delegate: ActivityView {}
model: assignmentsModel
+
+ PlasmaExtras.PlaceholderMessage {
+ anchors.centerIn: parent
+ width: parent.width - (PlasmaCore.Units.largeSpacing * 4)
+ visible: assignmentsModel.count == 0
+ iconName: "mail-read-symbolic"
+ text: "No assignments"
+ }
}
}