feat(web): /app 新增 HTML 動畫 → MP4 上傳介面#88
Merged
Conversation
接上已合併的後端 POST /upload/html (PR #87), 讓使用者直接從 /app 操作, 不必手動打 API。 - types.ts: SourceType 加 html_animation。 - api.ts: uploadHtmlAnimation() — multipart 送 file/url + duration/fps/ width/height, 對齊 /upload/html 契約。 - CreateJobForm.tsx: html_animation 走專屬分支 — 上傳 .html 或貼 URL 二擇一 (無 server-path 模式), 加 duration(必填)/fps/解析度三欄 (含 9:16 直向預設); theme/length/cover/outro 等 deck 專屬選項自動隱藏 (themeApplicable 不含它)。 - SourceBadge.tsx: 加 html_animation 徽章 (HTML)。 驗證: tsc --noEmit 0 error; vite build 通過; TestClient 以前端送出的 FormData (url 模式 + .html 上傳模式, mock=true) 實打 /upload/html 皆回 201。 Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01MGT1mi2KPYyD76U1BKEhMo
dofliu
marked this pull request as ready for review
June 26, 2026 14:53
…-frontend-ui # Conflicts: # web/src/api.ts # web/src/components/CreateJobForm.tsx # web/src/components/ui/SourceBadge.tsx # web/src/types.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
這個 PR 做什麼
延續 #87(後端 HTML→MP4,已合併),把功能接到
/app前端,讓使用者直接拖一支.html或貼一個 URL 就能產影片,不必手動打 API。變更
types.ts—SourceType加html_animation。api.ts—uploadHtmlAnimation():multipart 送file/url+duration/fps/width/height+options_json,對齊後端POST /upload/html契約。CreateJobForm.tsx—html_animation走專屬分支:.html或貼 URL 二擇一(無 server-path 模式)。theme / length_mode / cover / outro等 deck 專屬選項自動隱藏(themeApplicable本就不含它),避免無關欄位干擾。SourceBadge.tsx— 加html_animation徽章(HTML)。使用流程
/app→ 新增 Job → Source type 選 html_animation → 上傳.html或貼 URL → 設長度/fps/解析度 → 建立。Job 背景 render(rendering → done)完成後,MP4 自動出現在 /library,按既有的 YouTube 一鍵上傳即可發佈。驗證
tsc --noEmit:0 error;vite build:通過(60 modules,無警告)。TestClient以前端實際送出的 FormData(url 模式 +.html上傳模式,mock=true)打/upload/html→ 皆回 201,背景 mock render 產出 MP4。範圍
純前端接線,後端不動。含外部 asset 的 zip 包裹仍未支援(單一自含
.html或 URL),留待後續。🤖 Generated with Claude Code
Generated by Claude Code