plasmoid: Give PlaceholderMessage an icon

"edit-none": No paired devices

"network-disconnect": All paired devices are unavailable

"kdeconnect": pairedDevicesModel.count < 0
This commit is contained in:
Fushan Wen 2022-05-07 16:04:16 +08:00
parent f12169ef00
commit 2c9af9874e
No known key found for this signature in database
GPG key ID: 2E48D1487C91DCAA

View file

@ -41,6 +41,13 @@ PlasmaExtras.Representation {
anchors.centerIn: parent anchors.centerIn: parent
visible: devicesView.count === 0 visible: devicesView.count === 0
iconName: {
if (pairedDevicesModel.count >= 0) {
return pairedDevicesModel.count === 0 ? "edit-none" : "network-disconnect";
}
return "kdeconnect";
}
text: { text: {
if (pairedDevicesModel.count >= 0) { if (pairedDevicesModel.count >= 0) {
return pairedDevicesModel.count == 0 ? i18n("No paired devices") : i18np("Paired device is unavailable", "All paired devices are unavailable", pairedDevicesModel.count) return pairedDevicesModel.count == 0 ? i18n("No paired devices") : i18np("Paired device is unavailable", "All paired devices are unavailable", pairedDevicesModel.count)