refactor(frontend): split endpoint handling

This commit is contained in:
2026-07-02 19:46:19 +01:00
parent fe735faba8
commit e0969a1d78
21 changed files with 366 additions and 369 deletions

View File

@@ -3,17 +3,11 @@ import { Radio, Check, Bookmark, Scissors, Film, Activity, Loader2, X } from "lu
import clsx from "clsx";
import Box from "../components/Box.tsx";
import BlueButton from "../components/buttons/BlueButton.tsx";
import {
getUser,
getCurrentStream,
getStreamHistory,
getMarkers,
createMarker,
deleteMarker,
saveSectionByMarkers,
clipSection,
getJob,
} from "../utils/endpoints.ts";
import { getUser } from "../utils/api/users.ts";
import { getCurrentStream, getStreamHistory } from "../utils/api/stream.ts";
import { getMarkers, createMarker, deleteMarker } from "../utils/api/markers.ts";
import { saveSectionByMarkers, clipSection } from "../utils/api/media.ts";
import { getJob } from "../utils/api/jobs.ts";
import type { User, StreamStatus, StreamHistoryItem, Marker, JobResponse } from "../utils/types.ts";
import { formatTime, formatLocalDate, stringToDate } from "../utils/utils.ts";
@@ -134,7 +128,6 @@ const StreamControl = () => {
refreshMarkers();
const interval = setInterval(refreshMarkers, 5000);
return () => clearInterval(interval);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isStreaming, streamStatus?.id]);
useEffect(() => {