Simplify the printer state display

CURA-7745
This commit is contained in:
Jaime van Kessel 2020-10-12 11:06:49 +02:00
parent 77290451e1
commit 3ad5219f5d
No known key found for this signature in database
GPG Key ID: 3710727397403C91

View File

@ -347,18 +347,23 @@ Item
if (!printer) {
return catalog.i18nc("@label:status", "Loading...")
}
if (printer && printer.state == "disabled")
if (printer.state == "disabled")
{
return catalog.i18nc("@label:status", "Unavailable")
}
if (printer && printer.state == "unreachable")
if (printer.state == "unreachable")
{
return catalog.i18nc("@label:status", "Unreachable")
}
if (printer && !printer.activePrintJob && printer.state == "idle")
if (!printer.activePrintJob && printer.state == "idle")
{
return catalog.i18nc("@label:status", "Idle")
}
if (!printer.activePrintJob && printer.state == "printing")
{
// The print job isn't quite updated yet.
return catalog.i18nc("@label:status", "Printing")
}
return ""
}
visible: text !== ""