Commit Graph

542 Commits

Author SHA1 Message Date
小鱼开发 4af42c157e fix: BGM 混音链路修复——URL 先下载到本地缓存再混音
- fix: 删除 BGM 预览硬编码开发者路径,改为使用 url 字段
- fix: BGM 混音前检测是否为 URL,先下载到 bgm_cache 本地缓存
- fix: Rust mix_bgm_to_video 恢复 validate_safe_path 校验,拒绝 URL
- feat: 新增 bgm_cache 目录及自动清理策略(30天/200MB上限)
- feat: Settings 缓存清理扩展为媒体缓存(video + BGM 统一清理)
- chore: BGM url 字段改为后端必填,同步 schema/model/seed/迁移
2026-05-25 00:54:17 +08:00
小鱼开发 818fe7cc03 release: v1.6.0
- fix: finalVideoDuration 遗漏导致切换项目时残留旧值且无法保存
- feat: BGM 云端化(129 首上传七牛云,数据库保存 URL)
- feat: BGM 弹窗改为分类+列表+试听交互
- feat: 步骤页面 UI 统一(按钮规范、预览状态、去掉图标)
- feat: CoverDesign 视觉重构(绿色边框、角标、hover 遮罩)
- fix: 消除积分预检硬编码(CoverDesign/SubtitleBurning/VideoCompose)
- fix: success 提示积分去掉硬编码
- fix: BGM/封面形象持久化到 meta.json
v1.6.0
2026-05-24 22:16:46 +08:00
小鱼开发 c6e3e6dd25 fix: success 提示中的积分消耗去掉硬编码
CoverDesign: 2 → coverDesignPoints
SubtitleBurning: 2 → subtitleBurnPoints
VideoCompose: 5 → composePoints
ScriptCreation: 5 → scriptPoints
2026-05-24 21:42:08 +08:00
小鱼开发 daba6dcc14 fix: 消除积分预检硬编码,统一使用 getRule() 动态读取
CoverDesign: 预检 COVER_POINTS=2 → getRule('cover_design')?.points || 2
SubtitleBurning: 预检 SUBTITLE_POINTS=2 → getRule('subtitle_burn')?.points || 2
VideoCompose: 预检 COMPOSE_POINTS=5 → getRule('compose')?.points || 5

确保预检口径与扣费口径一致,避免后端规则调整后出现余额误判
2026-05-24 21:29:04 +08:00
小鱼开发 6a2302401f fix: 修复 BGM 弹窗和封面持久化的多个 bug
VideoCompose:
- 修复 Audio 对象泄漏:弹窗关闭/组件卸载时清理 onended 回调
- 修复 bgmMusicId=0 被误判为未选择(falsy 判断改为 !== undefined/null)
- 修复 Slider 进度条不随值变化:动态传入 --slider-percent CSS 变量
- 修复试听无 url 时无法播放:回退到 filePath 拼接本地路径
- 去掉 webkitRelativePath 错误回退
- 弹窗默认分类:打开时根据当前选中 BGM 的 category 自动切换标签
- 本地上传 BGM 弹窗内显示当前选中提示条(含清除按钮)

CoverDesign:
- 自动保存去掉 trim(),避免输入时吃掉末尾空格
- 缩小自动保存依赖范围,只监听 backgroundImage/avatarImage

VideoGeneration.css:
- 本地上传提示条样式
2026-05-24 20:43:54 +08:00
小鱼开发 b76252b0ac fix: BGM/封面形象持久化 + 滑块颜色
- localStorage.saveMeta 的 orderedMeta 补充 bgmMusicId/bgMusicTitle/bgmMusicPath/bgmVolume,修复 BGM 数据无法写入 meta.json
- CoverDesign 新增 useEffect:背景图/形象变化时自动防抖保存 coverConfig
- VideoCompose BGM 音量滑块添加 slider-input 类,使用主题绿色替代浏览器默认蓝色
2026-05-24 20:34:52 +08:00
小鱼开发 bb84cb5604 style: BGM 分类标签圆角改为中等(去掉椭圆形) 2026-05-24 20:24:28 +08:00
小鱼开发 184ab8bce3 feat: BGM 弹窗改为分类+列表+试听交互
- 顶部分类标签栏(全部/知识科普/案例展示/促销活动/家居生活/智能家居)
- 列表布局:每项含试听按钮、标题、时长、选中标记
- 试听功能:点击圆形按钮播放/暂停,播放中按钮呼吸动画
- 选中 BGM 后关闭弹窗,本地上传入口移至底部
- 弹窗关闭时自动停止音频播放
2026-05-24 20:22:57 +08:00
小鱼开发 2c9e0f0015 feat: add BGM seed data and seed script for deployment
- bgm_seed_data.json: 129 首 BGM 元数据(含七牛云 URL)
- seed_bgm.py: 部署环境初始化脚本,容器内直接运行
2026-05-24 20:09:50 +08:00
小鱼开发 06ec0ee202 feat: BGM 云端化 + 步骤页面 UI 统一重构
后端:
- 新增 BGM 数据库模型、Schema、CRUD、API 路由
- BgmMusic 增加 url 字段存储七牛云地址
- Alembic 迁移: 创建 BGM 表 + 添加 url 字段
- import_bgm.py 导入时自动上传七牛云 (meijiaka-zy/bgm/...)

前端:
- VideoCompose BGM 选择改为卡片弹窗 (系统BGM + 本地上传)
- 去掉 BGM 硬编码本地路径, 直接使用云端 URL
- CoverDesign 视觉重构: 绿色边框卡片、角标、hover 遮罩
- CoverDesign 去掉预选背景, 默认空白需手动选择
- 所有步骤按钮规范统一: 左=重新生成(主色), 右=导出/预览(次色)
- 预览按钮状态统一: 文字变为'视频预览中...', 保持 btn-secondary
- 去掉所有步骤按钮的 svg/emoji 图标

Rust:
- mix_bgm_to_video 支持临时文件保护 (输入输出同路径时自动中转)
- FFmpeg BGM 混合使用 aloop 循环 + amix 滤镜
2026-05-24 15:39:54 +08:00
小鱼开发 616649c872 feat(cover-avatar): 前置余额检查 + 积分不足弹窗(与声音复刻一致) 2026-05-23 11:13:17 +08:00
小鱼开发 fae2a77734 feat(ui): 封面形象余额不足时不弹 toast;声音复刻弹窗增加积分消耗提示 2026-05-23 11:08:47 +08:00
小鱼开发 53371aabcd feat(image): 封面形象抠图增加积分消耗(每次 10 积分)
- config/points-config.yaml: 添加 cover_avatar: 10 固定积分
- point_service.py: _CATEGORY_MAP 添加 cover_avatar → 封面形象
- image.py: remove_background 接口前置余额检查 + 后置扣费
- CoverAvatarLibrary.tsx: 上传弹窗显示积分提示,余额不足友好提示
2026-05-23 10:59:47 +08:00
小鱼开发 9589d7c78a fix(cover-avatar): 修复卡片操作按钮误触 + 列表滚动 2026-05-23 10:19:01 +08:00
小鱼开发 bf51d8b423 style(cover-avatar): 列表改为 avatar-card 卡片样式(hover 操作按钮 + 图片缩放 + 4 列网格) 2026-05-23 10:16:28 +08:00
小鱼开发 db34090d5d feat(image): 人物描边宽度从 10px 调整为 20px 2026-05-23 10:10:21 +08:00
小鱼开发 d18e705a99 feat(image): 抠图增加人物白色描边(need_contour + contour_color + contour_size + need_crop_background)
- provider: 增加 need_contour/contour_color/contour_size/need_crop_background 参数
- service: 默认 scene=human,human/product 场景自动启用白色描边 + 裁剪背景
- adapter: 透传新参数到 provider
- API: scene 默认值改为 human
- 前端: removeBackground 默认 scene 改为 human
2026-05-23 10:04:34 +08:00
小鱼开发 6011225eec fix(image): 抠图结果下载后转存七牛云,解决前端 CORS 跨域加载失败 2026-05-23 09:50:40 +08:00
小鱼开发 222c468681 fix(mediakit): 兼容火山引擎抠图API的两种响应格式(code/data 和 success/result) 2026-05-23 09:44:27 +08:00
小鱼开发 430aea4aa8 fix(image): 增强抠图失败时的诊断日志,记录原始响应内容 2026-05-23 09:39:38 +08:00
小鱼开发 df6915191a chore(deploy): 恢复 deploy-test.sh 可执行权限 2026-05-23 09:35:15 +08:00
小鱼开发 9733a7f311 fix(progress-modal): 图标匹配改为互斥条件,避免标题同时命中多个关键词时重复渲染 2026-05-23 09:34:38 +08:00
小鱼开发 29f74f7afc chore(deploy): 让 deploy-test.sh 在 Git 中保持可执行权限 2026-05-23 09:26:15 +08:00
小鱼开发 8a5f0ace34 fix(update): 204 响应不通过 HTTPException 抛出,避免 Content-Length 校验失败 2026-05-23 09:24:53 +08:00
小鱼开发 f01f2c366a feat(cover-avatar): 封面形象功能
后端:
- 新增 POST /upload/image 图片上传(七牛云 image bucket)
- 新增 POST /image/remove-background AI 抠图(火山引擎 MediaKit)
- 提取 file_validation.py 共享模块

Rust:
- 新增 cover_avatar.rs 存储层(cover_avatars.json + 图片本地存储)
- 新增 4 个 IPC 命令:load/save/delete/save_image

前端:
- 新增 CoverAvatarLibrary 页面(内容管理 → 封面形象)
- 新增 coverAvatar API 模块和 coverAvatarStore
- 封面设计集成:背景图/封面形象弹窗选择 + Fabric.js 叠加
- 优化左侧布局:视觉素材横向卡片(9:16)+ 文案配置分组
2026-05-22 18:38:18 +08:00
小鱼开发 c55c256dc7 style(settings): reduce section title size (22px -> 18px) 2026-05-22 15:38:07 +08:00
小鱼开发 a7c81c14eb refactor(sidebar): remove lightning icon, adjust avatar/text layout
- Remove lightning bolt SVG from balance display
- Increase avatar size (32px -> 36px)
- Tighten nickname/balance spacing in user-info
- Adjust user-name font weight (500 -> 600) and size (var(--font-sm) -> 14px)
- Reduce sidebar-user justify-content: center -> default (flex-start)
2026-05-22 15:33:10 +08:00
小鱼开发 7f43795b2e refactor(sidebar): move balance below nickname 2026-05-22 15:28:43 +08:00
小鱼开发 9870a8cbc8 refactor(app-header): move back button to right side 2026-05-22 15:25:16 +08:00
小鱼开发 538cb1a367 refactor(sidebar): merge balance and user into unified card 2026-05-22 15:22:50 +08:00
小鱼开发 a50c61bbb5 refactor(pricing): remove explanation section from pricing modal 2026-05-22 15:17:20 +08:00
小鱼开发 19a166a873 fix(pricing): line break after period for video rule detail 2026-05-22 15:14:29 +08:00
小鱼开发 1cb1c0b387 refactor(profile): remove logout button
Profile page no longer shows logout button — logout is accessible via Sidebar dropdown menu only.
2026-05-22 15:10:22 +08:00
小鱼开发 1a0679049e refactor(profile): restore recent transactions table
Replace menu list (使用明细 + 设置) with recent transactions table:
- Add back recentTx state and loading state
- Fetch last 5 transactions in loadData
- Display table with type/amount/description/time columns
- Add '查看全部' link to usage-detail page
- Remove unused icon components (FileTextIcon, SettingsIcon, ChevronRightIcon)
2026-05-22 15:02:11 +08:00
小鱼开发 91774f52ee refactor(Phase 3): merge SystemUpdate + AboutUs into Settings page
- New Settings page combines: system update check, version info, auth/copyright
- Remove standalone AboutUs.tsx and SystemUpdate.tsx
- Route: 'about-us' + 'system-update' → 'settings'
- Profile menu: merge '系统设置' + '关于我们' into single '设置' entry
- Sidebar dropdown: add '设置' back to user menu (besides '我的账户')
2026-05-22 14:48:29 +08:00
小鱼开发 34d6f671fe refactor(Phase 2): extract components + AppHeader
New components:
- PricingModal: standalone product pricing modal with lazy rule loading
- PointsCard: reusable points balance + today consumed + action buttons
- AppHeader: unified page header with title, back button, and right actions

Profile.tsx:
- Use PricingModal + PointsCard (380 lines -> ~200 lines)
- Remove embedded pricing table logic (~80 lines)
- Remove inline points display logic (~40 lines)

Pages updated with AppHeader:
- Profile: '我的账户' (no back button)
- UsageDetail: '积分明细' + back button
- SystemUpdate: '系统更新' + back button
- AboutUs: '关于我们' + back button

CSS:
- Add app-header, app-header-left, app-header-title, app-header-right classes
- Remove margin-bottom from page-back-btn (handled by app-header)
2026-05-22 12:45:41 +08:00
小鱼开发 5386a1dbf4 refactor: redesign Profile page, fix navigation & interaction logic
Profile page:
- Add page title '我的账户' in settings-section h2
- Restructure points section: horizontal action buttons (充值/明细/定价)
- Remove '产品定价' from menu list (already in points section)
- Remove '更多' heading

Interaction fixes:
- Profile logout now uses onNavigate('logout') → App.tsx ConfirmModal
- Sidebar dropdown: only '我的账户' + '退出登录' (others go through Profile)
- Add back button to usage-detail / system-update / about-us → navigate to profile
- content-management click: only expand/collapse, no auto-navigate to first child

CSS:
- Add --bg-secondary / --bg-tertiary to variables.css
- Add page-back-btn CSS class
- Convert profile-points-actions to horizontal row layout
2026-05-22 11:27:41 +08:00
小鱼开发 abf03712a5 refactor(profile): tighten spacing, simplify logout button
- Reduce points card padding (20px→16px vertical)
- Reduce points section padding (24px→20px vertical)
- Reduce section spacing (24px→16px)
- Section title margin (12px→8px)
- Logout button: remove card background/border, keep text-only with error hover
2026-05-22 11:13:10 +08:00
小鱼开发 31fec11c44 refactor(profile): zero inline styles
- Add profile-card-flat, profile-edit-wrap, profile-section-spaced,
  profile-pricing-loading, profile-pricing-detail-list CSS classes
- Profile.tsx: remove all remaining inline style attributes
2026-05-22 11:05:45 +08:00
小鱼开发 0a52195490 refactor(profile): extract CSS classes, fix undefined vars, remove inline styles
- variables.css: add --bg-secondary and --bg-tertiary (used but undefined)
- ContentManagement.css: add 30+ Profile CSS classes following design system
- Profile.tsx: rewrite with className, remove all inline styles and emoji
  - pricing modal tags use semantic colors via CSS classes
  - logout hover uses var(--error) instead of hardcoded #e74c3c
  - menu items use CSS hover instead of onMouseEnter/Leave handlers
2026-05-22 11:04:01 +08:00
小鱼开发 aebc9f6bcc refactor: Phase 1 Profile/Settings UX refactoring
- Sidebar: Remove '系统设置' from navItems, add balance badge + user dropdown
  menu in footer (我的账户/使用明细/系统设置/关于我们/退出登录)
- Profile: Remove inline recent transactions table (UsageDetail page exists),
  simplify to info + points + menu entries. Add inline pricing modal.
- GenerationControls: Show current balance alongside point cost in button text
- Points config: Adjust subtitle_burn/cover_design to 5 pts, recharge validity
2026-05-22 10:50:48 +08:00
小鱼开发 574874c856 feat: 视频生成使用系统素材时每个额外收取 2 积分 2026-05-22 09:40:23 +08:00
小鱼开发 497e65d86d fix: 视频生成积分扣费不允许欠费 2026-05-21 22:28:41 +08:00
小鱼开发 372b36becc feat: 音量滑块范围改为 1-5(对应传参 0-4) 2026-05-21 22:18:03 +08:00
小鱼开发 582068b599 fix: 匹配素材成功后自动切换镜头并加载播放 2026-05-21 21:42:04 +08:00
小鱼开发 1448cd54ab feat: 匹配素材成功后自动加载播放预览 2026-05-21 21:32:14 +08:00
小鱼开发 59237f1098 style: 匹配素材按钮移到上传素材旁边 2026-05-21 21:29:33 +08:00
小鱼开发 d6fe43b7c3 feat: 匹配素材改为针对单个镜头匹配
- 新增 matchSingleMaterial 函数,调用单条匹配 API
- 点击'匹配素材'只匹配当前镜头,不影响其他镜头
2026-05-21 21:24:57 +08:00
小鱼开发 e52513f452 refactor: 匹配素材与换一个合并为同个按钮的不同状态 2026-05-21 21:22:16 +08:00
小鱼开发 4123b66ab9 fix: 添加 Tauri window.show/set_focus 权限
- 修复文件选择对话框触发的权限拒绝错误
- core:window:allow-show, core:window:allow-set-focus
2026-05-21 21:19:29 +08:00