diff --git a/frontend/src/pages/QueuePage.tsx b/frontend/src/pages/QueuePage.tsx index 5b03e070a..0b194ef9c 100644 --- a/frontend/src/pages/QueuePage.tsx +++ b/frontend/src/pages/QueuePage.tsx @@ -346,26 +346,40 @@ function SortableQueueItem({ const isPending = item.status === 'pending'; const isHistory = ['completed', 'failed', 'skipped', 'cancelled'].includes(item.status); + const isMobileSelectable = isPending && onToggleSelect; + return (
{ + if (window.innerWidth < 640) onToggleSelect(); + } : undefined} > -
- {/* Selection checkbox for pending items */} + {/* Mobile selected left accent bar */} + {isMobileSelectable && isSelected && ( +
+ )} + +
+ {/* Mobile selection indicator — left accent bar only, no tick */} + + {/* Selection checkbox for pending items - hidden on mobile, tap card instead */} {isPending && onToggleSelect && ( )} - {/* Drag handle or position number */} + {/* Drag handle or position number - hidden on mobile */} {isPending ? (
- +
) : position !== undefined ? ( -
+
#{position}
) : ( -
+
)} {/* Thumbnail - use plate-specific thumbnail if plate_id is set */} -
+
{item.archive_thumbnail ? ( ) : (
- +
)}
@@ -424,7 +438,7 @@ function SortableQueueItem({ {/* Info */}
-

+

{item.archive_name || item.library_file_name || `File #${item.archive_id || item.library_file_id}`} {(platesData?.is_multi_plate ?? false) && item.plate_id !== undefined && item.plate_id !== null && ` • ${plates.find(plate => plate.index === item.plate_id)?.name || t('queue.plateNumber', { index: item.plate_id })}`}

@@ -447,29 +461,31 @@ function SortableQueueItem({ ) : null}
-
- - +
+ + + {item.target_model ? `${t('queue.filter.any')} ${item.target_model}${item.target_location ? ` @ ${item.target_location}` : ''}${item.required_filament_types?.length ? ` (${item.required_filament_types.join(', ')})` : ''}` : item.printer_id === null ? t('queue.filter.unassigned') : (item.printer_name || `${t('common.printer')} #${item.printer_id}`)} + {item.print_time_seconds && ( - - + + {formatDuration(item.print_time_seconds)} )} {item.filament_used_grams && ( - - + + {formatWeight(item.filament_used_grams)} )} {item.created_by_username && ( - + {item.created_by_username} @@ -487,21 +503,21 @@ function SortableQueueItem({
{/* Options badges */} -
+
{item.manual_start && ( - - + + {t('queue.badges.staged')} )} {item.require_previous_success && ( - + {t('queue.badges.requiresPrevious')} )} {item.auto_off_after && ( - - + + {t('queue.badges.autoPowerOff')} )} @@ -509,17 +525,17 @@ function SortableQueueItem({ {/* Progress bar for printing items - TODO: integrate with WebSocket */} {isPrinting && status && ( -
-
-
+
+
+
{Math.round(status.progress || 0)}%
-
+
{status.remaining_time != null && status.remaining_time > 0 && ( <> @@ -543,7 +559,7 @@ function SortableQueueItem({ {/* Waiting reason for model-based assignments */} {item.waiting_reason && item.status === 'pending' && ( -

+

{item.waiting_reason}

@@ -551,88 +567,92 @@ function SortableQueueItem({ {/* Error message */} {item.error_message && ( -

+

{item.error_message}

)}
- {/* Status badge */} - + {/* Status badge + Actions */} + {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */} +
e.stopPropagation()}> + - {/* Actions */} -
- {isPrinting && ( - - )} - {isPending && ( - <> - {item.manual_start && ( +
+ {isPrinting && ( + + )} + {isPending && ( + <> + {item.manual_start && ( + + )} - )} - - - - )} - {isHistory && ( - <> - - - - )} + + + )} + {isHistory && ( + <> + + + + )} +
@@ -976,72 +996,72 @@ export function QueuePage() {
{/* Summary Cards */} -
+
- -
-
- + +
+
+
-
-

{activeItems.length}

-

{t('queue.summary.printing')}

+
+

{activeItems.length}

+

{t('queue.summary.printing')}

- -
-
- + +
+
+
-
-

{pendingItems.length}

-

{t('queue.summary.queued')}

+
+

{pendingItems.length}

+

{t('queue.summary.queued')}

- -
-
- + +
+
+
-
-

{formatDuration(totalQueueTime)}

-

{t('queue.summary.totalTime')}

+
+

{formatDuration(totalQueueTime)}

+

{t('queue.summary.totalTime')}

- -
-
- + +
+
+
-
-

{formatWeight(totalWeight)}

-

{t('queue.summary.totalWeight')}

+
+

{formatWeight(totalWeight)}

+

{t('queue.summary.totalWeight')}

- - -
-
- + + +
+
+
-
-

{historyItems.length}

-

{t('queue.summary.history')}

+
+

{historyItems.length}

+

{t('queue.summary.history')}

@@ -1049,9 +1069,9 @@ export function QueuePage() {
{/* Filters */} -
+
setFilterLocation(e.target.value)} > @@ -1094,10 +1114,11 @@ export function QueuePage() { )} -
+
{historyItems.length > 0 && (
-
+
{historyItems.slice(0, 20).map((item, index) => (