Use a Kirigami.PlaceholderMessage in the ignored list
This makes it look cleaner when there's nothing there, and looks standard beside other KDE applications. Also removes a duplicate "Ignored Users" form header that didn't add anything.
This commit is contained in:
@@ -20,15 +20,19 @@ FormCard.FormCardPage {
|
|||||||
width: Kirigami.Units.gridUnit * 16
|
width: Kirigami.Units.gridUnit * 16
|
||||||
height: Kirigami.Units.gridUnit * 32
|
height: Kirigami.Units.gridUnit * 32
|
||||||
|
|
||||||
FormCard.FormHeader {
|
children: Kirigami.PlaceholderMessage {
|
||||||
title: i18nc("@title:group", "Ignored Users")
|
icon.name: "im-invisible-user"
|
||||||
|
text: i18nc("Placeholder message when no user is ignored", "No ignored users")
|
||||||
|
visible: repeater.count === 0
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
FormCard.FormCard {
|
FormCard.FormCard {
|
||||||
FormCard.FormTextDelegate {
|
visible: repeater.count > 0
|
||||||
text: i18nc("Placeholder message when no user is ignored", "You are not ignoring any users")
|
|
||||||
visible: repeater.count === 0
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
}
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: repeater
|
id: repeater
|
||||||
model: root.connection.ignoredUsers()
|
model: root.connection.ignoredUsers()
|
||||||
|
|||||||
Reference in New Issue
Block a user