feat: Added missing pause/resume mutation hooks and Pause/Play icon imp…
- "src/frontend/src/pages/Queue.tsx" GSD-Task: S01/T01
This commit is contained in:
parent
ad16cc6141
commit
76f0dd882a
1 changed files with 5 additions and 3 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
import { useState, useMemo } from 'react';
|
import { useState, useMemo } from 'react';
|
||||||
import { ListOrdered, RotateCcw, X, RefreshCw } from 'lucide-react';
|
import { ListOrdered, RotateCcw, X, RefreshCw, Pause, Play } from 'lucide-react';
|
||||||
import { Table, type Column } from '../components/Table';
|
import { Table, type Column } from '../components/Table';
|
||||||
import { StatusBadge } from '../components/StatusBadge';
|
import { StatusBadge } from '../components/StatusBadge';
|
||||||
import { SkeletonQueueList } from '../components/Skeleton';
|
import { SkeletonQueueList } from '../components/Skeleton';
|
||||||
import { DownloadProgressBar } from '../components/DownloadProgressBar';
|
import { DownloadProgressBar } from '../components/DownloadProgressBar';
|
||||||
import { useDownloadProgress } from '../contexts/DownloadProgressContext';
|
import { useDownloadProgress } from '../contexts/DownloadProgressContext';
|
||||||
import { useQueue, useRetryQueueItem, useCancelQueueItem } from '../api/hooks/useQueue';
|
import { useQueue, useRetryQueueItem, useCancelQueueItem, usePauseQueueItem, useResumeQueueItem } from '../api/hooks/useQueue';
|
||||||
import { formatShortDateTime } from '../utils/format';
|
import { formatShortDateTime } from '../utils/format';
|
||||||
import { useTimezone } from '../hooks/useTimezone';
|
import { useTimezone } from '../hooks/useTimezone';
|
||||||
import type { QueueItem, QueueStatus } from '@shared/types/index';
|
import type { QueueItem, QueueStatus } from '@shared/types/index';
|
||||||
|
|
@ -57,6 +57,8 @@ export function Queue() {
|
||||||
const { data: items, isLoading, error, refetch } = useQueue(statusFilter);
|
const { data: items, isLoading, error, refetch } = useQueue(statusFilter);
|
||||||
const retryMutation = useRetryQueueItem();
|
const retryMutation = useRetryQueueItem();
|
||||||
const cancelMutation = useCancelQueueItem();
|
const cancelMutation = useCancelQueueItem();
|
||||||
|
const pauseMutation = usePauseQueueItem();
|
||||||
|
const resumeMutation = useResumeQueueItem();
|
||||||
|
|
||||||
// Table columns
|
// Table columns
|
||||||
const columns: Column<QueueItem>[] = useMemo(
|
const columns: Column<QueueItem>[] = useMemo(
|
||||||
|
|
@ -232,7 +234,7 @@ export function Queue() {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[retryMutation, cancelMutation],
|
[retryMutation, cancelMutation, pauseMutation, resumeMutation],
|
||||||
);
|
);
|
||||||
|
|
||||||
const tabBase: React.CSSProperties = {
|
const tabBase: React.CSSProperties = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue