fix frontend bug

This commit is contained in:
jaehwang committed 2026-09-08 15:57:35 +09:00
1 parent a18f7a5c8b
commit 9bb46f7004
10 files changed
+83 -21

No files matched your search

+10 -2
View File
@@ -6,7 +6,7 @@ import { useRouter, useSearchParams } from "next/navigation";
import StageStepper, { stageProgress } from "@/components/stage-stepper";
import { GateBody, GateShell } from "@/components/gate-card";
import { apiFetch } from "@/lib/api";
import { GATE_META, PLAYREEL_STAGE_LABELS, usePlayreelJob } from "@/lib/playreel";
import { GATE_META, PLAYREEL_STAGE_LABELS, usePlayreelJob, type PlayreelJob } from "@/lib/playreel";
import { useAutoApprove } from "@/lib/prefs";
import { isAutoApprovable } from "@/components/auto-approve";
@@ -70,6 +70,12 @@ export default function PlayreelJobPage({ params }: { params: Promise<{ id: stri
edits.current = null;
refresh();
} catch (e) {
// 실패 화면을 띄워둔 사이에 끝났을 수 있다. 그때는 에러 대신 결과를 보여준다
const latest = await apiFetch<PlayreelJob>(`/api/playreel/jobs/${id}`).catch(() => null);
if (latest?.status === "done") {
refresh();
return;
}
setActionError((e as Error).message);
} finally {
setBusy(false);
@@ -170,7 +176,9 @@ export default function PlayreelJobPage({ params }: { params: Promise<{ id: stri
<p style={{ margin: 0, fontSize: "var(--text-sm)", color: "var(--color-text-gray-400)" }}>출처 · <a href={job.source.url} target="_blank" rel="noreferrer" style={{ color: "var(--color-mint)" }}>공연 상품페이지 열기 →</a></p>
<div className="result-actions">
<Link href="/" className="btn-tonal-mint" style={{ textDecoration: "none", textAlign: "center" }}>새 버전 만들기</Link>
<a href={job.artifacts.video} download className="btn-cta" style={{ padding: "0.75rem 1rem", fontSize: "var(--text-base)", borderRadius: "var(--radius-xl)", textDecoration: "none" }}>MP4 다운로드</a>
{/* blob에 Content-Disposition이 박혀 있어 주소만 열면 내려받기가 된다.
<a download>은 다른 출처에 안 먹으므로 이 속성에 기대지 않는다 */}
<a href={job.artifacts.video} className="btn-cta" style={{ padding: "0.75rem 1rem", fontSize: "var(--text-base)", borderRadius: "var(--radius-xl)", textDecoration: "none" }}>MP4 다운로드</a>
</div>
</div>
</div>