feat(studio): My Videos library — browse, replay and download exported MP4s#47
Draft
abin0515 wants to merge 2 commits into
Draft
feat(studio): My Videos library — browse, replay and download exported MP4s#47abin0515 wants to merge 2 commits into
abin0515 wants to merge 2 commits into
Conversation
…d MP4s Adds a Create | My Videos view switcher to the studio toolbar. The library view lists every persisted export across projects (the project.exports history that core already records), plays them in an in-browser <video> player, and offers download / continue-editing. After an MP4 export finishes, the studio jumps straight to the player instead of only showing the output path. - core: add optional displayName to export records (human-readable local timestamp by default) and export formatExportDisplayName - studio-server: GET /api/library (flattened export history, newest first), GET /preview/:id/exports/:filename.mp4 (+ ?download=1 with a Content-Disposition name derived from displayName), and keep /preview/:id/export.mp4 as a latest-export shortcut - project-studio: nav switcher, library grid + player views, Play action on the chat MP4-ready card, i18n strings for both locales; vanilla JS/CSS, no new dependencies Closes nexu-io#46 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Entering My Videos always re-fetches /api/library (switchAppView), so the button was redundant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #46
按 issue 里 maintainer 的范围建议,第一刀只做「浏览导出历史 + 浏览器内播放 + 导出后直达播放器」;rename / delete 等管理操作留给后续 PR,避免文件操作边界情况撑大本次改动面。
改动内容
core
displayName(默认人类可读的本地时间戳,分钟精度),并导出formatExportDisplayNamestudio-server
GET /api/library—— 跨项目汇总导出历史(最新在前);对只有lastOutputMp4Path、没有exports记录的老项目做了兜底,旧导出不会丢GET /preview/:id/exports/:filename.mp4—— 按文件名提供某条历史导出;?download=1时带Content-Disposition,下载文件名取自displayNameGET /preview/:id/export.mp4—— 最新导出的快捷路由project-studio(纯 vanilla JS/CSS,无新增依赖)
Create | My Videos视图切换;进入库视图时创作工具自动隐藏<video>播放页,支持下载 / 继续编辑 / 返回列表,空状态引导回 Create顺带的 toolbar 适配(nav 多占 ~180px 引起)
<input>改为纯文本<span>(超长省略号截断)。注:这会触及 Fix features: Save project name on blur/Enter in top navbar 修复顶部导航栏内联重命名问题 #33(内联重命名修复)的范围——如果你们更倾向保留 input、由 Fix features: Save project name on blur/Enter in top navbar 修复顶部导航栏内联重命名问题 #33 修复编辑行为,我可以把这一小块撤出本 PR。验证(全部实跑,非 mock)
pnpm -r build全过/api/library返回真实历史(含displayName新记录与仅lastOutputMp4Path老记录两种路径);MP4 路由 200 + 正确 MIME;?download=1下载头正确;不存在的文件 404🤖 Generated with Claude Code