Commit Graph

568 Commits

Author SHA1 Message Date
imeepos 0495a32c74 feat: 实现导出到剪映功能 (v0.1.28)
- 新增剪映导出数据结构定义 (jianying_export.rs)
- 实现模板匹配结果导出到剪映格式的服务逻辑
- 添加导出到剪映的Tauri命令接口
- 在匹配记录卡片中添加导出按钮
- 实现文件保存对话框和用户交互
- 支持根据模板匹配结果生成完整的draft_content.json
- 自动替换匹配素材路径并生成随机素材ID
- 去除无引用素材,优化导出文件大小

功能特点:
- 完全符合剪映draft_content.json格式规范
- 准确的时间轴和素材路径映射
- 用户友好的导出界面和反馈
- 遵循promptx/tauri-desktop-app-expert开发规范
2025-07-16 22:33:57 +08:00
imeepos e3037916c0 feat: 实现一键匹配功能 (v0.1.26)
- 新增一键匹配后端服务,支持遍历项目模板绑定并逐一匹配
- 在项目详情页添加一键匹配按钮,支持批量匹配操作
- 实现批量匹配进度管理,包括实时进度跟踪和取消功能
- 添加一键匹配结果汇总,包含详细统计和报告导出功能
- 新增批量匹配相关组件:进度对话框、结果对话框、汇总卡片
- 遵循 promptx/tauri-desktop-app-expert 开发规范
- 支持错误处理、状态管理和用户体验优化
2025-07-16 21:52:48 +08:00
imeepos d3ab2aa284 fix: resolve list_matching_results deserialization error
- Add custom deserializer for MatchingResultStatus to handle empty strings
- Add serde(default) attributes to TemplateMatchingResultQueryOptions fields
- Update frontend to send undefined instead of empty string for status filter
- Fix 'unknown variant' and 'missing field' errors in template matching results

Resolves issue where selecting 'All Status' filter caused command failures.
2025-07-16 21:28:45 +08:00
imeepos d5ef9851cd feat: 实现模特详情页视频生成功能
- 新增模特详情页组件,支持照片上传和视频生成
- 实现视频生成数据模型和仓库层
- 集成Dify API进行视频生成
- 添加云存储上传功能,自动转换S3 URL为CDN地址
- 实现统一的删除确认弹框,替换window.confirm
- 支持照片和视频生成任务的删除功能
- 优化UI/UX设计,符合前端开发规范
- 添加完整的错误处理和状态管理

核心功能:
 模特照片上传到云端
 多选照片进行视频生成
 实时任务状态跟踪
 视频生成历史记录
 统一删除确认对话框
 响应式设计和优雅动画
2025-07-16 19:39:44 +08:00
imeepos 544ee61908 docs: 创建完整的README.md文档
- 添加项目愿景和使命说明
- 详细介绍核心功能特性
- 提供完整的快速开始指南
- 包含技术架构和项目结构
- 添加开发指南和贡献指南
- 提供API集成示例
- 包含更新日志和联系方式
- 遵循现代开源项目文档标准
2025-07-16 18:37:35 +08:00
imeepos 52ce437e63 fix: 修复ProjectDetails.tsx中的无限请求问题和模特名称显示
- 修复loadProjectClassificationStats函数的无限循环问题
- 使用useRef跟踪分类统计加载状态,避免重复请求
- 添加模特信息加载功能,显示真实模特名称而非model_id
- 优化useEffect依赖,防止不必要的重新渲染和请求
- 在项目切换和导入完成时正确重置加载状态
2025-07-16 18:33:57 +08:00
imeepos 08fa4eda61 feat: 实现项目详情页面筛选功能优化 v0.1.25
- 为片段管理添加使用状态筛选条件(全部/已使用/未使用)
- 为素材管理添加AI分类筛选条件(基于实际分类记录)
- 为素材管理添加模特筛选条件(全部/未指定/具体模特)
- 为素材管理添加使用状态筛选条件(全部/已使用/未使用)
- 优化UI/UX设计,添加动画效果和视觉一致性
- 实现基于视频分类记录的真实数据筛选逻辑
- 添加筛选条件显示和清除功能
- 遵循promptx/frontend-developer设计标准
2025-07-16 18:25:37 +08:00
imeepos 49b9d46a13 fix: layout bug 2025-07-16 16:52:44 +08:00
imeepos 22d079e44a fix: style 2025-07-16 16:46:17 +08:00
imeepos 31f94a51ff fix: 修复模板匹配结果应用时素材使用记录创建失败的问题
- 修复 create_usage_records_from_matching_result 命令参数命名问题
- 将前端调用参数从 snake_case 改为 camelCase 以匹配 Tauri 自动转换规则
- 确保模板匹配结果应用后能正确创建素材使用记录
- 遵循 Tauri 开发规范的参数命名约定
2025-07-16 16:40:25 +08:00
imeepos 5d39ddea80 fix: 修复保存 匹配记录的bug 2025-07-16 16:09:55 +08:00
imeepos a325b3ccc8 feat: 实现素材使用状态管理系统
1. 数据库层面改进:
   - 新增material_usage_records表记录素材使用历史
   - 为material_segments表添加usage_count、is_used、last_used_at字段
   - 实现数据库迁移逻辑

2. 数据模型和仓库:
   - 创建MaterialUsageRecord、MaterialUsageStats等数据模型
   - 实现MaterialUsageRepository处理使用记录的CRUD操作
   - 支持批量创建使用记录和统计查询

3. 业务逻辑改进:
   - 修改MaterialMatchingService,在获取素材片段时排除已使用的片段
   - 实现素材使用状态的自动更新机制
   - 支持重置素材使用状态功能

4. 前端集成:
   - 修改handleApplyMatchingResult函数,应用匹配结果时自动创建使用记录
   - 新增多个后端命令支持素材使用状态管理
   - 实现从匹配结果自动创建使用记录的便捷方法

5. 核心功能:
   - 一个素材片段只能使用一次的限制机制
   - 模板匹配时自动排除已使用的素材片段
   - 完整的使用历史记录和统计功能
   - 支持项目级别的使用状态重置

这个实现确保了素材的合理使用,避免重复使用同一素材片段,
同时提供了完整的使用追踪和管理功能。
2025-07-16 14:38:08 +08:00
imeepos 730ac22b84 fix: 修复get_matching_result_detail接口数据类型错误
修复'Invalid column type Real at index: 9, name: match_score'错误

问题根本原因:
1. 数据库schema中match_score字段定义为REAL类型
2. 数据插入时错误地将REAL/INTEGER字段转换为字符串
3. 数据读取时错误地尝试将REAL/INTEGER字段作为String类型获取

修复内容:
1. 修正matching_segment_results表相关字段的数据插入逻辑
   - match_score: 直接使用f64类型而非转换为字符串
   - segment_duration, start_time, end_time: 直接使用u64类型

2. 修正matching_failed_segment_results表相关字段的数据插入逻辑
   - segment_duration, start_time, end_time: 直接使用u64类型

3. 修正row_to_segment_result和row_to_failed_segment_result函数
   - 直接使用原始数据类型而非字符串解析

这确保了数据库操作的类型一致性,解决了get_matching_result_detail接口的错误。
2025-07-16 14:11:14 +08:00
imeepos 3e6c05c4ac fix: 修复模板匹配结果相关的数据类型错误
1. 修复list_matching_results接口'Invalid column type Integer at index: 18, name: is_active'错误
   - 修正template_matching_result_repository.rs中row_to_matching_result函数的is_active字段处理
   - 使用rusqlite::types::Value枚举正确处理多种数据类型

2. 修复数据插入和读取的类型不一致问题
   - 修正数据插入时将INTEGER字段转换为字符串的错误
   - 统一数据类型:数字字段直接使用原始类型而非字符串

3. 实现应用匹配结果功能
   - 修复ProjectDetails.tsx中handleApplyMatchingResult函数
   - 调用save_matching_result API保存匹配结果到数据库
   - 添加成功/失败通知提示

修复的具体问题:
- template_matching_results表的is_active字段类型处理
- 数字字段(total_segments, matched_segments等)的类型转换
- quality_score字段的NULL值处理
- 前端应用匹配结果后保存到数据库的逻辑
2025-07-16 14:05:01 +08:00
imeepos a4cacf42da hotfix: 修复get_all_projects接口description字段NULL值处理问题
- 修复project_repository.rs中row_to_project函数对description字段的错误处理
- 将description字段从String类型改为Option<String>类型正确处理NULL值
- 修复material_repository.rs中类似的问题
- 解决'Invalid column type Null at index: 3, name: description'错误

问题根本原因:
数据库schema允许description为NULL,但代码尝试获取非空String类型,
当description为NULL时导致类型转换失败。

修复方案:
使用Option<String>类型和filter方法正确处理NULL和空字符串情况。
2025-07-16 13:58:04 +08:00
imeepos 94d58a5bc5 feat: UI优化 - 添加匹配记录tab并优化TemplateMatching相关组件样式
- 在项目详情页面添加匹配记录tab,集成TemplateMatchingResultManager组件
- 优化TemplateMatchingResultManager组件样式,使用统一的设计系统
- 优化TemplateMatchingResultCard组件,采用card样式和渐变背景
- 优化TemplateMatchingResultDetailModal组件,使用统一的模态框样式
- 优化TemplateMatchingResultStatsPanel组件,增强视觉效果和进度条样式
- 遵循promptx/frontend-developer开发规范,确保样式统一、简洁美观
2025-07-16 13:51:28 +08:00
imeepos 1d6de409ed feat: 实现模板匹配结果保存和管理功能
- 新增模板匹配结果数据模型和数据库表结构
- 实现匹配结果Repository层,支持CRUD操作和查询
- 实现匹配结果Service层,提供业务逻辑和统计功能
- 新增Tauri命令接口,支持前端调用
- 实现前端TypeScript类型定义
- 更新MaterialMatchingService,支持自动保存匹配结果
- 新增前端管理界面组件:
  - TemplateMatchingResultManager: 主管理界面
  - TemplateMatchingResultCard: 结果卡片组件
  - TemplateMatchingResultDetailModal: 详情模态框
  - TemplateMatchingResultStatsPanel: 统计面板
- 编写完整的单元测试
- 新增API文档

功能特性:
- 保存匹配结果到数据库,包含成功和失败片段详情
- 支持匹配结果的查询、过滤、排序和分页
- 提供匹配统计信息和质量评分
- 支持软删除和批量操作
- 完整的前端管理界面,支持查看、编辑、删除操作
2025-07-16 13:34:32 +08:00
imeepos 1eebc98853 Update MaterialMatchingResultDialog component 2025-07-16 01:20:15 +08:00
imeepos ef4c047b30 fix(template-matching): 修复模板素材匹配逻辑
修复的问题:
- 固定素材被错误计入失败统计,导致成功率偏低
- 素材未切分时无可用片段,导致匹配完全失败
- 模板绑定验证逻辑未实现,返回空数据
- 时长单位不一致影响匹配准确性

 主要改进:
- 固定素材现在正确跳过匹配,不计入失败数
- 实现虚拟片段机制,为未切分素材创建虚拟片段
- 完善模板绑定验证逻辑,正确统计片段数量
- 修正时长单位转换,确保匹配准确性
- 增强错误信息,提供更详细的匹配失败原因

 修复效果:
- 修复前: 0个可用片段  匹配完全失败
- 修复后: 44个可用片段  匹配正常工作
- 三种匹配规则(固定素材/AI分类/随机匹配)现在都能正常工作

 技术细节:
- 在匹配前过滤固定素材,避免错误统计
- 为每个分类记录创建对应的虚拟片段
- 成功率基于可匹配片段计算,更准确反映匹配质量
- 实现完整的模板绑定验证,支持匹配预估
2025-07-16 00:56:51 +08:00
imeepos c7f9c9f4bb feat: 为MaterialCard添加缩略图功能并优化UI展示
- 为Material数据模型添加thumbnail_path字段
- 实现get_material_thumbnail_base64 API命令支持Material缩略图生成
- 创建MaterialThumbnail组件,支持懒加载和缓存机制
- 重新设计MaterialCard布局,使用缩略图替换文件类型图标
- 精简MaterialCard信息展示,将详细信息移到可折叠区域
- 优化按钮布局,使界面更加紧凑
- 简化切分片段显示方式,提升用户体验
- 修复数据库DateTime解析问题,支持SQLite和RFC3339两种格式
- 添加数据库迁移支持thumbnail_path字段
- 遵循promptx/tauri-desktop-app-expert开发规范
2025-07-16 00:25:08 +08:00
imeepos b6c85901ce docs: 添加缩略图修复验证指南和依赖更新 2025-07-15 23:36:06 +08:00
imeepos b06cae86f9 fix: 修复缩略图生成失败问题
- 增强FFmpeg缩略图生成的错误处理和详细日志
- 实现缩略图生成的重试机制,包括多种时间戳策略
- 添加缩略图生成前的预检查机制
- 优化FFmpeg命令参数,提高兼容性和成功率
- 添加单元测试验证修复效果

修复内容:
1. 增强日志记录,包括FFmpeg命令和输出信息
2. 实现重试机制:原时间戳失败时尝试0秒、中间时间点等
3. 预检查视频文件有效性、时间戳合理性、输出目录可写性
4. 优化FFmpeg参数:添加hide_banner、loglevel、update等选项
5. 在material_commands中使用新的重试机制

解决了FFmpeg执行完成但缩略图文件不存在的问题
2025-07-15 23:29:51 +08:00
imeepos 8c742bf262 feat: 创建统一的缩略图获取接口,使用视频实际尺寸
新增get_segment_thumbnail_base64接口:
- 根据segmentId统一获取缩略图base64数据URL
- 智能检查:数据库路径 -> 文件存在性 -> 自动重新生成
- 完整的错误处理和文件验证机制

 使用视频实际尺寸生成缩略图:
- 添加get_video_info方法获取视频元数据
- 保持原始宽高比,最大宽度160像素
- 支持音频流信息解析和完整的VideoMetadata结构

 代码优化:
- 简化前端缩略图加载逻辑,统一使用新接口
- 移除重复的generateSegmentThumbnail函数
- 清理不必要的参数传递和依赖项

 功能特点:
- 自动检测文件丢失并重新生成
- 使用视频原始尺寸保持最佳显示效果
- 统一的错误处理和缓存机制
- 减少代码重复,提高维护性

现在缩略图生成更加智能和高效,能够自动处理文件丢失的情况,并使用视频的实际尺寸生成最佳质量的缩略图。
2025-07-15 22:49:53 +08:00
imeepos 44f3f40705 fix: 修复缩略图显示权限问题,使用base64数据URL
解决asset.localhost访问权限问题:
- 添加read_thumbnail_as_data_url命令读取文件并转换为base64数据URL
- 避免使用convertFileSrc的asset.localhost协议访问问题
- 添加base64依赖支持文件编码

 优化缩略图加载:
- 使用数据URL直接在img标签中显示缩略图
- 正确处理Windows长路径前缀 \\\\?\\
- 统一错误处理和降级机制

 技术改进:
- 移除不再使用的convertFileSrc导入
- 添加详细的控制台日志便于调试
- 确保跨平台文件路径兼容性

现在缩略图可以正确显示,不会因为权限问题导致加载失败。
2025-07-15 22:38:22 +08:00
imeepos 723575ba7e fix: 修复Windows长路径前缀问题
路径处理优化:
- 去掉Windows长路径前缀 \\\\?\\ 避免文件URL转换错误
- 在convertFileSrc之前清理路径格式
- 确保缩略图URL在所有平台上正确显示

 修复内容:
- 数据库读取的缩略图路径处理
- 新生成缩略图的路径处理
- 统一使用convertFileSrc确保跨平台兼容性

现在缩略图可以正确显示,不会因为Windows长路径前缀导致加载失败。
2025-07-15 22:26:27 +08:00
imeepos 4d61fb69f3 fix: 修复缩略图生成功能
解决编译问题:
- 修复async函数中跨await点持有MutexGuard的Send trait问题
- 添加get_segment_by_id_sync同步方法避免锁生命周期冲突
- 修复Path类型推断问题

 优化FFmpeg缩略图生成:
- 添加-pix_fmt yuvj420p参数解决色彩空间问题
- 添加-q:v 2参数提升图片质量
- 添加-f image2参数明确指定输出格式
- 解决MJPEG编码器参数错误问题

 功能特点:
- 使用视频首帧生成缩略图
- 缩略图路径保存到数据库
- 智能缓存机制避免重复生成
- 优雅的错误处理和降级

现在缩略图生成功能可以正常工作,用户可以在MaterialSegmentView中看到实际的视频预览图。
2025-07-15 22:20:46 +08:00
imeepos 70e4acb2c2 feat: 为MaterialSegmentView添加视频片段缩略图显示功能 2025-07-15 22:02:59 +08:00
imeepos 0898b4b9e2 feat: 为MaterialSegmentView添加视频片段缩略图显示功能
缩略图显示功能:
- 使用视频首帧生成缩略图:取片段开始时间作为缩略图时间戳
- 智能缓存机制:避免重复生成相同片段的缩略图
- 异步加载:缩略图生成不阻塞界面渲染
- 优雅降级:生成失败时显示默认视频图标

 ThumbnailDisplay组件:
- 独立的缩略图显示组件,职责单一
- 加载状态指示:显示旋转动画表示正在生成缩略图
- 错误处理:图片加载失败时自动回退到默认图标
- 响应式设计:160x120像素缩略图,适配卡片布局

 技术实现:
- 利用现有generate_video_thumbnail命令生成缩略图
- Map缓存机制:segmentId -> thumbnailUrl映射
- file://协议:本地文件访问支持
- useEffect钩子:组件挂载时自动加载缩略图

 用户体验优化:
- 视觉丰富:片段卡片显示实际视频内容预览
- 快速识别:用户可以通过缩略图快速识别视频内容
- 性能优化:缓存机制避免重复生成
- 加载反馈:清楚的加载状态提示

 功能特点:
- 首帧缩略图:使用片段开始时间的首帧作为预览
- 自动生成:无需手动操作,自动为每个片段生成缩略图
- 内存缓存:同一会话中避免重复生成
- 错误恢复:生成失败时显示默认图标,不影响其他功能

现在MaterialSegmentView提供了更加直观的视觉体验:
1. 每个片段卡片显示实际的视频首帧缩略图
2. 用户可以快速预览视频内容
3. 加载过程有清楚的视觉反馈
4. 生成失败时有优雅的降级处理
2025-07-15 22:01:41 +08:00
imeepos 10177d2501 feat: 为MaterialSegmentView添加视频片段播放功能
视频播放功能:
- 为Eye按钮添加点击播放功能:点击后播放对应的视频片段
- 传递片段参数:文件路径、开始时间、结束时间
- 悬停效果优化:按钮颜色从灰色变为蓝色
- 工具提示:显示'播放视频片段'提示文字

 后端播放命令:
- 新增play_video_segment命令:支持播放指定时间段的视频
- 跨平台播放器支持:
  * Windows: 使用cmd /C start启动默认播放器
  * macOS: 使用open命令启动默认播放器
  * Linux: 使用xdg-open启动默认播放器
- 文件存在性检查:播放前验证视频文件是否存在
- 完善错误处理:播放失败时给出详细错误信息

 系统集成:
- 命令注册:在lib.rs中正确注册play_video_segment命令
- 日志记录:记录播放操作的成功/失败状态
- 参数传递:支持文件路径和时间参数传递

 用户体验:
- 一键播放:点击Eye按钮直接播放视频片段
- 系统默认播放器:使用用户熟悉的播放器应用
- 即时反馈:点击后立即启动播放器
- 视觉提示:按钮状态清楚表达可点击性

 功能特点:
- 智能播放:虽然后端接收时间参数,但使用系统默认播放器播放完整视频
- 跨平台兼容:Windows/macOS/Linux都能正常工作
- 错误恢复:文件不存在或播放器启动失败时有相应提示
- 性能优化:异步播放,不阻塞界面操作

现在用户可以:
1. 点击任意片段的Eye按钮播放对应视频
2. 使用系统默认播放器观看视频内容
3. 享受跨平台一致的播放体验
4. 在播放失败时获得清楚的错误提示

注:当前实现使用系统默认播放器播放完整视频文件,未来可以考虑集成支持时间段播放的专业播放器。
2025-07-15 21:57:58 +08:00
imeepos 91eb22aaa9 feat: 优化MaterialSegmentView文件显示和添加打开目录功能
文件显示优化:
- 提取文件名显示:从完整路径中提取文件名,避免显示过长的路径
- 处理Windows长路径格式:正确处理\\\\?\\前缀的长路径
- 简洁的文件名展示:只显示文件名而不是完整路径

 打开目录功能:
- 添加FolderOpen图标按钮:每个片段卡片都有打开目录按钮
- 跨平台支持:Windows使用explorer /select,macOS使用open -R,Linux使用xdg-open
- 智能路径处理:自动检测文件/目录并使用合适的打开方式
- 错误处理:完善的错误处理和日志记录

 后端命令实现:
- 新增open_file_directory命令:支持打开文件所在目录
- 注册到invoke_handler:在lib.rs中正确注册新命令
- 系统集成:使用系统默认的文件管理器打开目录

 UI/UX改进:
- 文件名+按钮布局:文件名和打开按钮在同一行显示
- 悬停效果:按钮有hover状态,提供良好的交互反馈
- 工具提示:按钮有'打开文件所在目录'的提示文字
- 图标设计:使用FolderOpen图标,直观表达功能

 功能特点:
- 一键打开:点击按钮直接在文件管理器中打开文件所在目录
- 文件定位:Windows下会自动选中对应文件
- 路径兼容:支持各种路径格式,包括长路径
- 安全检查:文件不存在时会给出错误提示

现在用户可以:
1. 看到简洁的文件名而不是冗长的完整路径
2. 点击文件夹图标快速打开文件所在目录
3. 在文件管理器中直接定位到对应文件
4. 享受跨平台一致的用户体验
2025-07-15 21:52:58 +08:00
imeepos 30a4cfc23f feat: 优化MaterialSegmentView筛选条件布局为单行显示
布局优化:
- AI分类筛选改为单行显示:'AI分类:' + 选项按钮
- 模特筛选改为单行显示:'模特:' + 选项按钮
- 使用flex布局,标签和选项在同一行
- 标签部分使用flex-shrink-0防止收缩

 视觉改进:
- 标签文字添加冒号,更清晰的层次结构
- 保持原有的颜色主题:AI分类(蓝色),模特(绿色)
- 选项按钮保持原有的样式和交互效果
- 数量显示保持在按钮内的小徽章中

 响应式设计:
- flex-wrap确保选项按钮在小屏幕上能够换行
- gap-4提供合适的间距
- 保持良好的移动端体验

 用户体验提升:
- 更紧凑的布局,节省垂直空间
- 清晰的标签指示,用户一眼就能看到筛选维度
- 保持所有原有功能:点击筛选、数量显示、状态管理
- 筛选逻辑完全不变,只是视觉布局优化

现在筛选条件显示为:
- AI分类:全部(44) 全身(20) 半身(15) 其他(9)
- 模特:全部(44) 杨明明(44)

这种单行布局更加简洁明了,符合用户的使用习惯。
2025-07-15 21:46:45 +08:00
imeepos 6610695177 fix: 修复MaterialSegmentView数据结构不匹配问题,实现完整的多条件筛选功能
修复数据结构不匹配:
- 发现前端期望字段(classification_info, model_info, material_info)与后端实际返回字段(classification, model, material_name, material_type)不匹配
- 更新前端SegmentWithDetails接口定义,与后端MaterialSegmentView数据结构保持一致
- 修复所有过滤逻辑中的字段引用:classification_info -> classification, model_info -> model
- 修复渲染卡片中的字段引用:material_info.name -> material_name

 完善多条件筛选功能:
- 修复分类过滤逻辑:使用segment.classification?.category进行筛选
- 修复模特过滤逻辑:使用segment.model?.name进行筛选
- 修复搜索过滤逻辑:使用segment.material_name进行搜索
- 修复标签信息显示:正确显示classification和model信息

 验证数据流通:
- 后端正常返回44个片段详情
- 按分类聚合:3个分类组
- 按模特聚合:1个模特组
- 统计信息:总片段数44
- 前端成功接收并处理数据

 解决的问题:
- 统计信息有数据但下方列表没数据的问题已解决
- 前后端数据结构现在完全匹配
- 多条件筛选功能正常工作
- AI分类和模特筛选都能正确过滤数据
- 搜索功能与筛选条件正确组合

 功能验证:
-  后端API调用正常(get_project_segment_view)
-  数据结构匹配,字段映射正确
-  多条件筛选逻辑工作正常
-  卡片渲染显示正确信息
-  搜索和筛选组合功能正常
-  应用构建和运行成功

现在MaterialSegmentView组件完全正常工作,用户可以:
1. 看到完整的片段统计信息
2. 在下方列表中看到所有片段数据
3. 使用AI分类筛选功能
4. 使用模特筛选功能
5. 使用组合筛选(AI分类 AND 模特)
6. 使用搜索功能与筛选条件组合
2025-07-15 21:44:34 +08:00
imeepos 60cd01c1ec feat: 重构MaterialSegmentView为多条件筛选系统 - 移除标签页设计
核心功能重构:
- 移除标签页(tab)设计,改为同时显示AI分类和模特的筛选条件
- 实现组合筛选:AI分类 AND 模特的多条件检索
- 支持类似'AI分类:全身 and 模特:杨明明'的筛选组合

 多条件筛选系统:
- AI分类筛选:独立的筛选区域,显示所有分类选项及数量
- 模特筛选:独立的筛选区域,显示所有模特选项及数量
- 组合筛选:两个条件可以同时生效,实现精确筛选
- 当前筛选条件显示:实时显示已选择的筛选条件

 UI/UX优化:
- 分区设计:AI分类和模特各自独立的筛选区域
- 视觉区分:AI分类使用蓝色主题,模特使用绿色主题
- 筛选状态显示:当有筛选条件时显示当前筛选状态栏
- 清除功能:一键清除所有筛选条件
- Card卡片风格:片段展示保持卡片设计

 数据处理优化:
- 智能过滤:先获取所有片段,再依次应用分类和模特过滤
- 组合逻辑:支持分类 AND 模特的组合筛选
- 搜索集成:搜索功能与筛选条件无缝结合
- 实时更新:筛选条件变化时立即更新结果

 技术实现:
- 移除activeTab状态,简化组件逻辑
- 优化过滤算法,支持多条件组合
- 保持useMemo性能优化
- 完善的错误处理和加载状态

 交互体验:
- 直观的筛选界面:用户可以清楚看到所有可用的筛选选项
- 即时反馈:点击筛选条件立即看到结果变化
- 状态提示:当前筛选条件清晰显示,支持快速清除
- 空状态处理:没有匹配结果时的友好提示

 功能特点:
- 支持单一条件筛选:只选择AI分类或只选择模特
- 支持组合条件筛选:同时选择AI分类和模特
- 支持搜索+筛选:搜索词与筛选条件组合使用
- 支持快速重置:一键清除所有筛选条件

这个重构完全满足了用户的新需求:
1.  移除了标签页设计
2.  实现了AI分类和模特的同时筛选
3.  支持组合筛选条件(AI分类 AND 模特)
4.  提供了清晰的筛选状态显示和管理
2025-07-15 21:36:33 +08:00
imeepos e1e4b9d67a feat: 重构MaterialSegmentView为多条件检索标签页风格
核心功能重构:
- 将MaterialSegmentView改为多条件检索的标签页风格
- 实现AI分类和模特两个主要检索维度
- 移除折叠/展开功能,改为直接平铺Card卡片风格

 标签页检索系统:
- AI分类标签页:显示所有分类选项及对应数量
- 模特标签页:显示所有模特选项及对应数量
- 全部选项:显示总片段数量
- 动态数量显示:每个选项显示对应的片段数量

 UI/UX优化:
- Card卡片风格:每个片段使用独立卡片展示
- 缩略图显示:支持视频缩略图预览
- 标签信息:显示分类、模特、置信度等信息
- 操作按钮:查看、编辑、删除等快捷操作
- 搜索功能:支持按片段名称、分类、模特搜索

 数据展示优化:
- 时长格式化:MM:SS格式显示时间
- 置信度显示:百分比形式显示AI分类置信度
- 状态标签:不同颜色区分分类和模特信息
- 响应式布局:适配不同屏幕尺寸

 技术实现:
- 使用get_project_segment_view API获取数据
- useMemo优化性能,避免不必要的重新计算
- TypeScript类型安全,完整的接口定义
- 错误处理和加载状态管理

 交互体验:
- 标签页切换:平滑的标签页切换动画
- 过滤选择:点击标签即可过滤对应内容
- 实时搜索:输入即时过滤结果
- 空状态处理:友好的空数据提示

 性能优化:
- 智能过滤:基于选中标签和搜索词的组合过滤
- 数据缓存:避免重复API调用
- 组件优化:使用React hooks优化渲染性能

这个重构完全满足了用户的需求:
1.  检索风格改为标签页
2.  AI分类和模特维度,显示全部/具体选项+数量
3.  内容直接平铺Card卡片风格,无折叠/展开
4.  合理规划内容布局,美观易用
2025-07-15 21:28:51 +08:00
imeepos 49bc9211d6 feat: 重构MaterialSegmentView为多条件检索标签页风格
核心功能重构:
- 将MaterialSegmentView改为多条件检索的标签页风格
- 实现AI分类和模特两个主要检索维度
- 移除折叠/展开功能,改为直接平铺Card卡片风格

 标签页检索系统:
- AI分类标签页:显示所有分类选项及对应数量
- 模特标签页:显示所有模特选项及对应数量
- 全部选项:显示总片段数量
- 动态数量显示:每个选项显示对应的片段数量

 UI/UX优化:
- Card卡片风格:每个片段使用独立卡片展示
- 缩略图显示:支持视频缩略图预览
- 标签信息:显示分类、模特、置信度等信息
- 操作按钮:查看、编辑、删除等快捷操作
- 搜索功能:支持按片段名称、分类、模特搜索

 数据展示优化:
- 时长格式化:MM:SS格式显示时间
- 置信度显示:百分比形式显示AI分类置信度
- 状态标签:不同颜色区分分类和模特信息
- 响应式布局:适配不同屏幕尺寸

 技术实现:
- 使用get_project_segment_view API获取数据
- useMemo优化性能,避免不必要的重新计算
- TypeScript类型安全,完整的接口定义
- 错误处理和加载状态管理

 交互体验:
- 标签页切换:平滑的标签页切换动画
- 过滤选择:点击标签即可过滤对应内容
- 实时搜索:输入即时过滤结果
- 空状态处理:友好的空数据提示

 性能优化:
- 智能过滤:基于选中标签和搜索词的组合过滤
- 数据缓存:避免重复API调用
- 组件优化:使用React hooks优化渲染性能

这个重构完全满足了用户的需求:
1.  检索风格改为标签页
2.  AI分类和模特维度,显示全部/具体选项+数量
3.  内容直接平铺Card卡片风格,无折叠/展开
4.  合理规划内容布局,美观易用
2025-07-15 21:26:53 +08:00
imeepos 19a05f4e8a fix 2025-07-15 21:23:54 +08:00
imeepos f67c6357e1 fix: 重构项目详情页面 2025-07-15 21:20:00 +08:00
imeepos 05c9694063 fix: Resolve all runtime errors and complete project details optimization
Fixed Critical Runtime Errors:
- Resolved React infinite loop caused by useCallback dependency issues
- Fixed MaterialSegmentStats null pointer exceptions with proper null checks
- Replaced non-existent get_material_segment_stats command with get_project_segment_view
- Added comprehensive error handling and loading states

 Enhanced Project Details Page:
- Successfully added 'Project Overview' tab as default selection
- Consolidated all statistics into overview tab (project stats, segment stats, AI progress)
- Moved project information display to overview with formatted timestamps
- Optimized scrolling behavior with fixed height containers (calc(100vh-16rem))

 Improved Data Integration:
- Integrated MaterialSegmentStats component with proper viewMode configuration
- Used existing get_project_segment_view command to fetch segment statistics
- Added proper TypeScript type handling for segment view data
- Implemented fallback data structure for error scenarios

 UI/UX Enhancements:
- Added consistent padding across all tab content areas
- Implemented loading skeleton states for segment statistics
- Enhanced visual hierarchy with proper section headings
- Optimized tab content scrolling to prevent external scrollbars

 Technical Improvements:
- Added useCallback for loadSegmentStats to prevent dependency loops
- Proper null checking in MaterialSegmentStats component
- Enhanced error handling with meaningful fallback states
- Maintained hot reload functionality throughout development

 Current Status:
- All runtime errors resolved
- Project overview tab displays comprehensive project information
- Smooth scrolling within tab content areas
- Hot reload working correctly
- No TypeScript compilation errors
- Backend data integration functioning properly

The project details page now provides a unified overview experience with all statistics and information consolidated in a single, easily accessible location.
2025-07-15 21:09:00 +08:00
imeepos d5335d7803 feat: Optimize project details page layout and information display
Enhanced Tab Structure:
- Added new 'Project Overview' tab as default selection
- Reorganized tab navigation with Brain icon for overview
- Improved tab content scrolling with fixed height containers

 Consolidated Statistics Display:
- Moved all project statistics to Overview tab (materials, videos, audio, images, AI queue)
- Integrated MaterialSegmentStats for comprehensive segment analytics
- Added AI classification progress tracking in overview
- Consolidated project information display with creation/update times

 Improved Layout & Scrolling:
- Fixed scrolling behavior - removed external scrollbars
- Set tab content height to calc(100vh-16rem) for optimal viewport usage
- Added consistent padding (p-4 md:p-6) across all tab content areas
- Optimized content organization for better information hierarchy

 Technical Improvements:
- Added loadSegmentStats function with proper error handling
- Integrated MaterialSegmentStats component with ByClassification view mode
- Updated dependency arrays for proper data loading
- Enhanced project information display with formatted timestamps

 User Experience Benefits:
- Single overview tab provides complete project status at a glance
- Improved navigation with logical information grouping
- Better scrolling performance with contained scroll areas
- Consistent visual hierarchy across all tabs
- Reduced information fragmentation across multiple views

The project details page now provides a more organized and efficient way to view all project-related information, with the overview tab serving as a comprehensive dashboard for project status, statistics, and progress tracking.
2025-07-15 21:02:41 +08:00
imeepos a6f9e82c65 fix: Resolve TypeScript build errors and clean up unused imports
Fixed Build Issues:
- Removed unused imports in ProjectList, ModelList, ProjectForm, DataTable, CardGrid
- Fixed variant type mismatches in TableAction and GridAction interfaces
- Replaced InteractiveTextarea with standard textarea in ProjectForm
- Updated EmptyState usage to use correct component props
- Removed unused ModelCardSkeleton component definition

 Code Cleanup:
- Cleaned up unused Search, Filter, MoreHorizontal, Eye, Edit, Trash2 imports
- Removed unused filters state in DataTable
- Removed unused actions parameter in CardGrid
- Simplified ProjectForm description field implementation
- Fixed EmptyProjectList usage in ProjectList

 Build Status:
- All TypeScript errors resolved
- Hot reload working correctly
- Development server running smoothly on port 5174
- No more compilation warnings or errors

The application now builds successfully with all UI/UX enhancements intact.
2025-07-15 20:50:54 +08:00
imeepos 496b26cdeb feat: Complete final UI/UX optimization phase - Visual hierarchy, mobile experience, and accessibility
Enhanced Visual Hierarchy System:
- Implemented comprehensive typography scale (display, heading, body, caption levels)
- Created semantic color system with emphasis levels (high, medium, low, disabled)
- Established consistent spacing scale (xs to 3xl) for margins, gaps, and padding
- Added shadow hierarchy (subtle to dramatic) for depth perception
- Implemented border and border-radius systems for visual consistency

 Advanced Visual Effects:
- Added gradient backgrounds for primary, secondary, success, warning, error, info
- Implemented glass-morphism effects with backdrop blur
- Created glow effects for interactive elements
- Added status indicators with online/busy/away/offline states
- Built progress bars with animated stripes
- Designed badge system with semantic colors
- Created elegant dividers with gradient effects

 Mobile-First Responsive Design:
- Implemented 44px minimum touch targets for accessibility
- Optimized button and input sizes for mobile devices
- Created mobile-specific navigation patterns
- Added touch-friendly modal and card layouts
- Implemented responsive table design with mobile card view
- Added swipe gesture support with scroll snap
- Optimized typography scaling for different screen sizes

 Comprehensive Accessibility Features:
- Added keyboard navigation support with focus-visible indicators
- Implemented skip links for screen readers
- Created ARIA state management (expanded, selected, disabled, invalid)
- Added high contrast mode support
- Implemented focus trap for modals
- Added live regions for dynamic content announcements
- Created screen reader only content classes

 Performance Optimizations:
- Added GPU acceleration for smooth animations
- Implemented content visibility for better rendering
- Created lazy loading patterns for images
- Added virtual scrolling support
- Implemented memory-efficient rendering with containment
- Added font loading optimizations (swap, block, optional)
- Created debounced animations to prevent jank

 Utility Class System:
- Built comprehensive layout utilities (flex-center, flex-between, grid-center)
- Added text utilities (ellipsis, line-clamp, emphasis levels)
- Created visibility utilities (visible-on-hover, visible-on-focus)
- Implemented state utilities (loading, error, success, warning)
- Added spacing and sizing utilities for rapid development

 Cross-Device Compatibility:
- Mobile devices: Touch-optimized interactions with haptic feedback
- Tablets: Balanced layout with appropriate sizing
- Desktop: Enhanced hover states and keyboard navigation
- Large screens: Optimized layouts with increased content density
- High contrast displays: Enhanced visibility and readability
- Reduced motion preferences: Respectful animation handling

This comprehensive update establishes a robust design system that provides:
- Consistent visual language across all components
- Excellent accessibility for users with disabilities
- Smooth performance on all device types
- Professional mobile experience
- Future-proof scalability for new features

The application now meets modern web standards for design, accessibility, and performance.
2025-07-15 20:42:41 +08:00
imeepos 1b7f7b44a8 feat: Complete comprehensive UI/UX enhancement phase
Enhanced Interactive Components:
- Created InteractiveButton with ripple effects, haptic feedback, and multiple variants
- Developed InteractiveInput and InteractiveTextarea with real-time validation and status indicators
- Added FloatingActionButton for quick actions with elegant tooltips
- Implemented comprehensive micro-interactions and animations

 Advanced Loading & Skeleton States:
- Enhanced SkeletonLoader with multiple variants (model, material, template, table-row)
- Added specialized skeleton components (ModelCardSkeleton, MaterialCardSkeleton, etc.)
- Created EnhancedLoadingState with progress indicators and operation tracking
- Implemented BatchOperationLoading for complex workflows

 Optimized Form Experience:
- Upgraded ProjectForm with new interactive components
- Added real-time validation feedback and error animations
- Implemented smart input states (success, error, loading)
- Enhanced user feedback with visual and haptic responses

 Perfected Empty States:
- Redesigned EmptyState with multiple variants and illustrations
- Created specialized empty state components (EmptyProjectList, EmptyModelList, etc.)
- Added contextual tips and guidance for better user onboarding
- Implemented error states and recovery actions

 Advanced Data Display:
- Built comprehensive DataTable with search, sort, filter, and pagination
- Created flexible CardGrid with view switching and bulk operations
- Added row selection, bulk actions, and advanced filtering
- Implemented responsive layouts and mobile optimization

 Rich Animation System:
- Added 20+ new micro-interaction animations
- Implemented button press, success pulse, error shake effects
- Created smooth slide-in animations for all directions
- Added loading dots, heartbeat, and bounce-in animations

 Key Features:
- Ripple effects on button clicks with haptic feedback
- Real-time form validation with animated error states
- Contextual empty states with actionable guidance
- Advanced data tables with full CRUD operations
- Responsive card grids with multiple view modes
- Comprehensive loading states for better perceived performance

All components now provide rich visual feedback, smooth animations, and professional user experience that matches modern design standards.
2025-07-15 20:38:34 +08:00
imeepos 134deb80fb feat: Optimize UI layout with fixed navigation and scrollable content
Layout Optimization:
- Fixed navigation bar at the top with sticky positioning
- Main content area now properly scrollable with flex layout
- Improved overall page structure for better UX

 Scrolling Enhancements:
- Added custom scrollbar styling for better visual appeal
- Implemented smooth scrolling behavior across the application
- Optimized scroll areas in ProjectDetails, TemplateManagement, AiClassificationSettings, and ModelList
- Added proper overflow handling for long content lists

 Visual Improvements:
- Beautiful custom scrollbars with hover effects
- Proper height constraints for content areas (calc(100vh-16rem))
- Enhanced scrolling experience with backdrop blur effects
- Added scroll indicators and shadow effects for better UX

 Responsive Design:
- Mobile-optimized scrolling behavior
- Proper touch scrolling on mobile devices
- Adaptive content heights for different screen sizes
- Maintained accessibility with reduced motion support

 Technical Improvements:
- Fixed JSX syntax errors in TemplateManagement and ModelList
- Improved component structure for better maintainability
- Added comprehensive CSS classes for scroll management
- Enhanced performance with optimized overflow handling

All pages now provide a smooth, professional scrolling experience while keeping the navigation always accessible.
2025-07-15 20:18:28 +08:00
imeepos 887f5de793 feat: Complete Modal and Tab UI/UX optimization
Enhanced Modal Components:
- Optimized DeleteConfirmDialog with beautiful gradients and improved layout
- Enhanced MaterialEditDialog with modern design and better information hierarchy
- Improved TemplateDetailModal with elegant header and refined tab navigation
- Enhanced AiClassificationFormDialog with modern styling

 Unified Tab System:
- Created reusable TabNavigation component with multiple variants (default, pills, underline)
- Implemented consistent tab design across ProjectDetails and other pages
- Added support for icons, counts, and disabled states in tabs
- Improved accessibility and keyboard navigation

 Advanced Animations:
- Added comprehensive modal animations (fade-in, scale-in, slide-in)
- Enhanced backdrop blur effects and smooth transitions
- Implemented proper enter/exit animations for better UX
- Added reduced motion support for accessibility

 Responsive Design:
- Optimized modal layouts for mobile, tablet, and desktop
- Improved touch-friendly interactions for mobile devices
- Enhanced modal sizing and positioning across screen sizes
- Added proper scrolling and overflow handling

 Interaction Improvements:
- Enhanced ESC key support for modal closing
- Improved backdrop click handling
- Better focus management and keyboard navigation
- Consistent button styling and hover effects

All modal and tab components now follow unified design language while maintaining full functionality.
2025-07-15 20:09:54 +08:00
imeepos 5d86a6411f feat: Complete UI/UX optimization v0.1.21 - Final enhancements
- Enhanced TemplateManagement page with beautiful header and improved layout
- Optimized TemplateCard with gradient backgrounds and refined visual effects
- Improved empty state design with elegant icons and better messaging
- Enhanced pagination component with modern styling
- Added comprehensive responsive design optimizations for mobile and tablet
- Implemented touch-friendly interactions for mobile devices
- Added support for different screen orientations and pointer types
- Enhanced animations with device-specific optimizations
- Improved accessibility with proper touch target sizes
- Added dark mode support and high-resolution display optimizations
- Completed comprehensive design system with reusable components
- All pages now follow consistent visual design language
2025-07-15 19:52:31 +08:00
imeepos 19903303ae feat: UI/UX optimization v0.1.21 - Enhanced visual design and user experience
- Unified color system with modern blue theme
- Enhanced ProjectCard with beautiful gradients and hover effects
- Improved Navigation with modern logo and enhanced link styles
- Optimized ProjectDetails page with elegant header and statistics cards
- Enhanced ModelCard and ModelList with refined visual effects
- Improved AiClassificationSettings with beautiful page header
- Optimized TemplateManagement with modern design elements
- Added comprehensive design system with reusable component styles
- Enhanced animations and transitions for smoother interactions
- Improved responsive design for better mobile and tablet experience
- Added support for dark mode and high-resolution displays
- Maintained existing functionality while improving visual appeal
2025-07-15 19:45:02 +08:00
imeepos fed5cdd73d fix: UI 样式优化 2025-07-15 19:42:39 +08:00
imeepos 888675dbf1 fix: 修复 素材列表 tag项目不触发数据更新 2025-07-15 19:06:29 +08:00
imeepos bc5d9d1054 fix: 修复素材查询 2025-07-15 19:00:58 +08:00
imeepos 0ea1b2cd38 fix: 添加只读链接 读写分离 2025-07-15 18:51:09 +08:00