Implement collection suggestions and bulk show addition features
Added new API endpoints for suggesting collections based on existing shows and for bulk adding shows to collections. Enhanced the backend with necessary logic and DTOs to support these features. Updated the frontend to include new components for displaying collection suggestions and managing bulk additions, improving the user experience for collection management. Localization updates were made to support these new features in both English and Russian.
This commit is contained in:
@@ -9,6 +9,7 @@ import { Badge, type BadgeProps } from '@/shared/ui/badge'
|
||||
import { Button } from '@/shared/ui/button'
|
||||
import { Pager } from '@/shared/ui/pager'
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/shared/ui/select'
|
||||
import { toast } from '@/shared/ui/toast-store'
|
||||
import { useTableSort } from '@/shared/lib/table-sort'
|
||||
import { SortHeader } from '@/shared/ui/sortable'
|
||||
import { deleteMedia, getMediaStats, listMedia } from './api'
|
||||
@@ -89,9 +90,14 @@ export function MediaPanel() {
|
||||
const lastActivity = useRef(activity)
|
||||
useEffect(() => {
|
||||
if (lastActivity.current === activity) return
|
||||
// Очередь опустела — говорим об этом вслух: обработка идёт минутами, и следить за чипами,
|
||||
// ожидая нуля, никто не должен. Сравниваем с прошлым состоянием, чтобы не поздравлять
|
||||
// с пустой очередью при каждом заходе на экран.
|
||||
const wasBusy = lastActivity.current !== '0:0'
|
||||
lastActivity.current = activity
|
||||
if (wasBusy && activity === '0:0') toast.success(t('admin.media.queueDrained'))
|
||||
void refetch()
|
||||
}, [activity, refetch])
|
||||
}, [activity, refetch, t])
|
||||
|
||||
const invalidate = () => queryClient.invalidateQueries({ queryKey: qk.media.all })
|
||||
const onError = useApiError()
|
||||
|
||||
Reference in New Issue
Block a user