Refactor .gitignore to streamline ignored files and enhance clarity. Update CLAUDE.md to improve unit test instructions and add coverage reporting details. Revise README.md for better project overview and deployment instructions. Refactor ChannelEndpoints and StreamingEndpoints to utilize SegmentFiles for file resolution, improving code maintainability. Remove unused JunctionHandlers and update DependencyInjection for cleaner service registration. Enhance media processing services for better job handling and error management. Update frontend API types for consistency and clarity.
This commit is contained in:
@@ -3,6 +3,7 @@ import { Link } from '@tanstack/react-router'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { addGroupElements, createGroup, listGroups } from '@/features/admin/groups/api'
|
||||
import { qk } from '@/shared/api/query-keys'
|
||||
import { Button } from '@/shared/ui/button'
|
||||
import { Input } from '@/shared/ui/input'
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/shared/ui/select'
|
||||
@@ -21,9 +22,9 @@ export function ClipGroupPanel({ onError }: { onError: (error: unknown) => void
|
||||
const [newName, setNewName] = useState('')
|
||||
const [over, setOver] = useState(false)
|
||||
|
||||
const { data: groups } = useQuery({ queryKey: ['admin', 'groups'], queryFn: listGroups })
|
||||
const { data: groups } = useQuery({ queryKey: qk.groups.all, queryFn: listGroups })
|
||||
const invalidate = () => {
|
||||
void queryClient.invalidateQueries({ queryKey: ['admin', 'groups'] })
|
||||
void queryClient.invalidateQueries({ queryKey: qk.groups.all })
|
||||
}
|
||||
|
||||
const createMutation = useMutation({
|
||||
|
||||
@@ -6,14 +6,14 @@ import { useTranslation } from 'react-i18next'
|
||||
import { deleteCollection } from '@/features/admin/collections/api'
|
||||
import { useUploadStore } from '@/features/admin/media/upload-store'
|
||||
import { deleteShow, renameShow } from '@/features/admin/shows/api'
|
||||
import { HttpError } from '@/shared/api/client'
|
||||
import { qk } from '@/shared/api/query-keys'
|
||||
import type { InterstitialDto } from '@/shared/api/types'
|
||||
import { useApiError } from '@/shared/lib/use-api-error'
|
||||
import { Badge } from '@/shared/ui/badge'
|
||||
import { Button } from '@/shared/ui/button'
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/shared/ui/dialog'
|
||||
import { HlsVideo } from '@/shared/ui/hls-video'
|
||||
import { Input } from '@/shared/ui/input'
|
||||
import { toast } from '@/shared/ui/toast-store'
|
||||
import { BlockBuilder } from './BlockBuilder'
|
||||
import { ClipGroupPanel } from './ClipGroupPanel'
|
||||
import { listInterstitialBlocks, listInterstitials, mediaPreviewUrl } from './api'
|
||||
@@ -34,19 +34,18 @@ export function InterstitialsPanel() {
|
||||
const [renaming, setRenaming] = useState<{ id: string; name: string } | null>(null)
|
||||
|
||||
const { data: clips, isLoading } = useQuery({
|
||||
queryKey: ['admin', 'interstitials'],
|
||||
queryKey: qk.interstitials.all,
|
||||
queryFn: listInterstitials,
|
||||
})
|
||||
const { data: blocks } = useQuery({
|
||||
queryKey: ['admin', 'interstitials', 'blocks'],
|
||||
queryKey: qk.interstitials.blocks,
|
||||
queryFn: listInterstitialBlocks,
|
||||
})
|
||||
|
||||
const invalidate = () => {
|
||||
void queryClient.invalidateQueries({ queryKey: ['admin', 'interstitials'] })
|
||||
void queryClient.invalidateQueries({ queryKey: qk.interstitials.all })
|
||||
}
|
||||
const onError = (error: unknown) =>
|
||||
toast.error(error instanceof HttpError ? error.detail : t('common.error'))
|
||||
const onError = useApiError()
|
||||
|
||||
const renameMutation = useMutation({
|
||||
mutationFn: ({ id, name }: { id: string; name: string }) => renameShow(id, name),
|
||||
|
||||
Reference in New Issue
Block a user