diff --git a/frontend/src/pages/QueuePage.tsx b/frontend/src/pages/QueuePage.tsx index 0b194ef9c..39fb5cfea 100644 --- a/frontend/src/pages/QueuePage.tsx +++ b/frontend/src/pages/QueuePage.tsx @@ -575,7 +575,6 @@ function SortableQueueItem({ {/* Status badge + Actions */} - {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
e.stopPropagation()}> diff --git a/frontend/src/utils/date.ts b/frontend/src/utils/date.ts index df1008bfb..d75930ba4 100644 --- a/frontend/src/utils/date.ts +++ b/frontend/src/utils/date.ts @@ -392,7 +392,7 @@ export function formatETA( ): string { const now = new Date(); const eta = new Date(now.getTime() + remainingMinutes * 60 * 1000); - + const today = new Date(); today.setHours(0, 0, 0, 0); const etaDay = new Date(eta); @@ -418,10 +418,10 @@ export function formatETA( */ export function formatDuration(seconds: number | null | undefined): string { if (seconds == null || seconds < 0) return '--'; - + const hours = Math.floor(seconds / 3600); const minutes = Math.floor((seconds % 3600) / 60); - + return hours > 0 ? `${hours}h ${minutes}m` : `${minutes}m`; } diff --git a/frontend/src/utils/file.ts b/frontend/src/utils/file.ts index e10916ba4..a2a3d9f4d 100644 --- a/frontend/src/utils/file.ts +++ b/frontend/src/utils/file.ts @@ -6,15 +6,15 @@ */ export function formatFileSize(bytes: number): string { if (bytes === 0) return '0 B'; - + const units = ['B', 'KB', 'MB', 'GB', 'TB']; const k = 1024; const i = Math.floor(Math.log(bytes) / Math.log(k)); - + const size = bytes / Math.pow(k, i); - + // No decimals for bytes, 1 decimal for larger units - return i === 0 - ? `${size} ${units[i]}` + return i === 0 + ? `${size} ${units[i]}` : `${size.toFixed(1)} ${units[i]}`; }