diff --git a/frontend/src/components/DownloadCenter.tsx b/frontend/src/components/DownloadCenter.tsx index c02dbdd1..d9135406 100644 --- a/frontend/src/components/DownloadCenter.tsx +++ b/frontend/src/components/DownloadCenter.tsx @@ -9,6 +9,7 @@ import { Link2, Pause, Play, + PlayCircle, Plus, RotateCcw, Scissors, @@ -26,6 +27,7 @@ const DownloadDialog = lazy(() => import("./DownloadDialog")); const ProfileEditor = lazy(() => import("./ProfileEditor")); const VideoEditor = lazy(() => import("./VideoEditor")); const ShareDialog = lazy(() => import("./ShareDialog")); +const LibraryPlayer = lazy(() => import("./LibraryPlayer")); import { useConfirm } from "./ConfirmProvider"; import { useLiveQuery } from "../lib/useLiveQuery"; import { useMe } from "../lib/useMe"; @@ -50,6 +52,7 @@ export default function DownloadCenter() { const [manage, setManage] = useState(false); const [metaJob, setMetaJob] = useState(null); const [shareJob, setShareJob] = useState(null); + const [playJob, setPlayJob] = useState(null); const [editJob, setEditJob] = useState(null); const [errorJob, setErrorJob] = useState(null); @@ -265,6 +268,9 @@ export default function DownloadCenter() {
{library.map((job) => ( + setPlayJob(job)} title={t("downloads.actions.play")}> + + {saveBtn(job)} {job.can_download && (job.asset?.duration_s ?? 0) > 0 && ( setEditJob(job)} title={t("downloads.actions.edit")}> @@ -333,6 +339,11 @@ export default function DownloadCenter() {
{(sharedQ.data ?? []).map((job) => ( + {job.can_download && ( + setPlayJob(job)} title={t("downloads.actions.play")}> + + + )} {job.can_download && saveBtn(job)} {job.can_download && (job.asset?.duration_s ?? 0) > 0 && ( setEditJob(job)} title={t("downloads.actions.edit")}> @@ -377,6 +388,7 @@ export default function DownloadCenter() { {manage && setManage(false)} />} {metaJob && setMetaJob(null)} />} {shareJob && setShareJob(null)} />} + {playJob && setPlayJob(null)} />} {editJob && setEditJob(null)} />} {errorJob && ( ; an audio-only asset (m4a/mp3, no dims) renders