fix(queue): show library file name in printer queue widget (#364)

The "Next in queue" widget on the printer card only checked
archive_name/archive_id, so file-manager-sourced queue items
displayed "Archive #null". Now falls back to library_file_name
and library_file_id, matching the Queue page display logic.
This commit is contained in:
maziggy
2026-02-16 13:46:22 +01:00
parent e13a72ef19
commit 6ba5d43a18
4 changed files with 5 additions and 4 deletions
@@ -66,7 +66,7 @@ export function PrinterQueueWidget({ printerId, printerState }: PrinterQueueWidg
<div className="min-w-0 flex-1">
<p className="text-xs text-bambu-gray">{t('queue.nextInQueue')}</p>
<p className="text-sm text-white truncate">
{nextItem?.archive_name || `Archive #${nextItem?.archive_id}`}
{nextItem?.archive_name || nextItem?.library_file_name || `File #${nextItem?.archive_id || nextItem?.library_file_id}`}
</p>
</div>
{totalPending > 1 && (
@@ -109,7 +109,7 @@ export function PrinterQueueWidget({ printerId, printerState }: PrinterQueueWidg
<div className="min-w-0 flex-1">
<p className="text-xs text-bambu-gray">{t('queue.nextInQueue')}</p>
<p className="text-sm text-white truncate">
{nextItem?.archive_name || `Archive #${nextItem?.archive_id}`}
{nextItem?.archive_name || nextItem?.library_file_name || `File #${nextItem?.archive_id || nextItem?.library_file_id}`}
</p>
</div>
</div>