Commit Graph

176 Commits

Author SHA1 Message Date
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
imeepos 8d8e98188d fix: 添加连接池功能 2025-07-15 18:43:22 +08:00
imeepos 86eeb90fb8 fix: 使用非阻塞锁获取 2025-07-15 18:20:00 +08:00
imeepos 6dcbd4a6e1 fix: 数据库链接 锁问题 2025-07-15 18:10:54 +08:00
imeepos 67ce7104e3 fix: 将所有仓库统一使用 database: Arc<Database> 方式 2025-07-15 17:45:08 +08:00
imeepos 54630ea2ff fix: 修复数据库链接锁问题 2025-07-15 17:11:44 +08:00
imeepos 590e254fe1 feat: 添加项目详情/素材管理的MaterialSegment聚合视图功能
- 新增MaterialSegment聚合视图,支持按AI分类和模特聚合展示
- 实现后端MaterialSegmentViewService和相关API命令
- 创建前端React组件:MaterialSegmentView、MaterialSegmentGroup、MaterialSegmentCard等
- 添加MaterialSegment详细信息模态框和批量操作对话框
- 实现搜索、筛选、排序、分页功能
- 集成虚拟滚动和性能优化
- 在ProjectDetails页面添加片段管理选项卡
- 遵循promptx开发规范和UI/UX设计标准
2025-07-15 16:49:08 +08:00
imeepos bab1dfc5fd feat: 实现素材匹配功能 v0.1.19
- 新增素材匹配服务 (MaterialMatchingService)
  - 支持AI分类匹配、随机匹配等规则
  - 实现模特限制逻辑(每个模特素材只能使用一次)
  - 时长匹配优化(相差越小越好)
  - 详细的匹配统计和失败原因分析

- 新增Tauri API命令
  - execute_material_matching: 执行素材匹配
  - get_project_material_stats_for_matching: 获取项目素材统计
  - validate_template_binding_for_matching: 验证模板绑定

- 新增前端组件和服务
  - MaterialMatchingResultDialog: 匹配结果对话框
  - MaterialMatchingService: 前端服务层
  - 完整的TypeScript类型定义

- UI集成
  - 在模板绑定列表添加匹配素材按钮
  - 集成到项目详情页面
  - 支持完整的匹配流程和结果展示

- 核心匹配规则
  - 只使用已AI分类的MaterialSegment
  - 每个素材只能使用一次
  - 模特限制:优先同一模特,失败后尝试其他模特
  - 视频时长必须大于模板需求,相差越小匹配度越高

- 测试覆盖
  - 后端服务单元测试
  - 覆盖正常匹配、失败场景、边界情况
2025-07-15 14:56:10 +08:00
imeepos 96b420e149 fix: 优化素材绑定页面UI布局和代码格式
- 清理多余的空行,优化代码格式
- 调整模特选择下拉框位置,移到批量操作区域
- 改善筛选区域的布局结构
- 保持UI组件的逻辑分组和视觉一致性
2025-07-15 14:24:28 +08:00
imeepos 37cf8bb75a feat: 为素材绑定页面添加项目筛选功能
- 添加项目筛选下拉框,支持按项目过滤素材
- 集成useProjectStore获取项目列表
- 修改loadMaterials函数支持项目ID筛选参数
- 在搜索条件变化时包含项目筛选条件
- 优化筛选UI布局,项目筛选位于绑定状态筛选之前
- 支持全部项目和特定项目的素材筛选功能
2025-07-15 14:23:26 +08:00
imeepos 7c40da1b83 fix: 修复素材绑定页面显示暂无素材的问题
- 添加get_all_materials后端命令获取所有项目的素材
- 在MaterialRepository中实现get_all方法
- 在MaterialService中添加get_all_materials方法
- 修改MaterialModelBindingService的getMaterialsByFilter方法,在没有指定项目时获取所有素材而不是返回空数组
- 确保素材绑定页面能正确显示所有素材数据,与统计信息保持一致
- 支持在全局素材列表上应用绑定状态和搜索过滤
2025-07-15 14:18:48 +08:00
imeepos de446b6410 fix: 修复项目详情页面模板绑定和素材绑定页面的搜索功能
- 修复项目详情页面模板绑定搜索功能:使用过滤后的绑定详情而不是原始数据
- 修复素材绑定页面搜索功能:添加useEffect监听搜索条件变化并重新加载数据
- 修复素材绑定页面统计功能:实现全局模特绑定统计API和前端调用
- 优化MaterialModelBindingService的getMaterialsByFilter方法,正确处理多重过滤条件
- 添加后端get_global_model_binding_stats命令和相关仓库方法
- 确保搜索和统计功能在所有相关页面正常工作
2025-07-15 14:10:29 +08:00
imeepos 03f410601a fix: 模板绑定批量删除后自动刷新列表
- 在ProjectDetails页面中修改批量删除回调,删除成功后自动重新获取模板绑定列表
- 简化store中batchDeleteBindings的实现,移除复杂的本地状态更新逻辑
- 确保批量删除操作完成后UI显示最新的数据状态
- 保持与单个删除操作一致的刷新机制
- 删除操作完成后清空选中状态,提升用户体验
2025-07-15 13:55:10 +08:00
imeepos a1ccde6b89 fix: 修复get_model_by_id死锁问题和批量删除模板功能
- 修复ModelService中get_model_by_id使用get_basic_by_id避免数据库死锁
- 解决MaterialCard组件中关联模特一直加载中的问题
- 修复ProjectTemplateBindingList中executeDelete函数的异步处理
- 在get_model_by_id命令中添加详细的调试日志
- 在MaterialCard中添加组件卸载时的状态清理机制
- 在批量删除服务中添加调试日志追踪问题
- 解决页面切换时loading状态不清除的问题
2025-07-15 13:49:43 +08:00
imeepos ba34481052 fix: 修复MaterialCard中get_model命令未找到的错误
- 将MaterialCard组件中的'get_model'命令调用修改为'get_model_by_id'
- 确保前端调用的命令名称与后端注册的命令名称一致
- 解决'Command get_model not found'错误
- 修复素材卡片中获取关联模特信息失败的问题
2025-07-15 13:44:07 +08:00
imeepos cc46115a26 fix: 修复素材导入时model_id为空的问题并添加调试日志
- 修复异步导入函数process_single_file_with_full_logic未使用model_id参数的问题
- 更新函数签名以正确传递model_id参数
- 在素材创建时使用Material::new_with_model而不是Material::new
- 在前端、Store层、后端各个环节添加详细的调试日志
- 确保model_id在整个导入流程中正确传递和使用
- 解决素材导入时选择模特但数据库中model_id为null的问题
2025-07-15 13:40:47 +08:00
imeepos 7e9190dd02 fix: 修复项目模板绑定priority列类型错误
- 修复project_template_binding_repository中priority列的类型不一致问题
- 将priority和is_active字段的存储从字符串改为整数类型
- 修复create、update和query操作中的类型转换错误
- 解决'Invalid column type Integer at index: 5, name: priority'错误
- 确保数据库schema与代码中的类型处理保持一致
2025-07-15 13:31:48 +08:00
imeepos 259ff992ae fix: 修复素材导入时model_id为null的数据库问题
- 在materials表初始创建时添加model_id列,避免依赖迁移
- 在初始索引创建中添加model_id索引
- 添加调试日志跟踪model_id在导入过程中的传递
- 确保素材导入时选择的模特ID能正确保存到数据库
- 解决素材导入+选择模特后数据库结果model_id=null的问题
2025-07-15 13:28:47 +08:00
imeepos 5686af3199 fix: 修复MaterialEditDialog中list_models命令不存在的错误
- 将MaterialEditDialog.tsx中的'list_models'调用改为'get_all_models'
- 确保前端调用的命令名称与后端注册的命令名称一致
- 解决'Command list_models not found'错误
2025-07-15 13:24:37 +08:00
imeepos 0b9a90771a fix: 修复CustomSelect组件null值警告
- 修复ProjectTemplateBindingList中activeFilter为null时传递给select元素的问题
- 更新getActiveFilterOptions函数,将null值改为空字符串
- 改进CustomSelect组件的类型定义和null值处理
- 添加safeValue转换确保select元素接收有效的字符串值
- 解决React警告:'value prop on select should not be null'
2025-07-15 13:21:30 +08:00
imeepos 8f1355ba16 fix: 修复数据库查询NULL值错误和Tauri命令参数命名问题
- 修复video_classification_repository中get_classification_stats函数的NULL值处理
- 将SUM()查询结果从直接获取i32改为Option<i32>并提供默认值0
- 修复get_templates_by_project等命令的参数命名,使用camelCase以匹配前端调用
- 解决'Invalid column type Null at index: 1, name: pending'错误
- 解决'invalid args projectId for command get_templates_by_project'错误
2025-07-15 13:18:04 +08:00
imeepos 9aa2cdd49f feat: 添加素材删除和重新处理功能
- 在MaterialCard组件中添加删除按钮,使用DeleteConfirmDialog替代window.confirm
- 在MaterialCard组件中添加重新处理按钮,当素材状态为Pending时显示
- 在ProjectDetails页面中添加删除和重新处理的处理函数
- 遵循Tauri开发规范和前端开发规范
- 实现了统一的删除确认对话框UI交互
2025-07-15 13:12:01 +08:00
imeepos 3f90013a47 feat: 完善素材导入模特绑定功能并添加测试
- 添加测试验证 CreateMaterialRequest 的 model_id 字段
- 添加测试验证 Material::new_with_model 方法
- 更新测试导入以包含新的 model_id 字段
- 确保数据结构和方法的正确性
2025-07-15 13:03:49 +08:00
imeepos ee7a1f6a1a fix: remote 导入动画 2025-07-15 12:59:45 +08:00
imeepos 6f888295bb feat: 添加素材导入时的模特绑定功能
- 在 CreateMaterialRequest 中添加 model_id 字段
- 更新 Material 实体添加 new_with_model 方法支持创建时绑定模特
- 修改 MaterialService 和 AsyncMaterialService 支持导入时模特绑定
- 在 MaterialImportDialog 中添加模特选择下拉框
- 支持在导入素材时可选择绑定到特定模特
- 遵循 Tauri 开发规范的组件设计和业务逻辑分层
2025-07-15 12:59:27 +08:00
imeepos b86a8a5c23 Merge feature/v0.1.13-binding-management into master
合并绑定管理功能到主分支

 新增功能:
- 项目-模板绑定管理系统
- 素材-模特绑定管理系统
- 统一通知系统
- 增强的用户界面组件

 技术改进:
- 完整的后端API实现
- 响应式前端界面设计
- 优化的状态管理
- 完善的测试框架

 版本: v0.1.13
 Feature Branch: feature/v0.1.13-binding-management
 代码变更: 41 files changed, 7259 insertions(+), 49 deletions(-)
2025-07-15 12:51:53 +08:00
imeepos 730402aba0 feat: 实现项目-模板绑定和素材-模特绑定管理功能
新功能:
- 项目-模板绑定管理系统
  - 支持主要/次要模板绑定类型
  - 绑定优先级和状态管理
  - 批量绑定操作
  - 绑定关系的CRUD操作

- 素材-模特绑定管理系统
  - 素材与模特的关联管理
  - 批量绑定/解绑操作
  - 绑定统计和分析
  - 素材编辑对话框

 架构改进:
- 新增项目-模板绑定数据模型和仓库层
- 新增素材-模特绑定业务服务层
- 完善的API命令层实现
- 响应式前端界面设计

 用户体验优化:
- 统一的通知系统
- 增强的加载状态组件
- 流畅的交互动画
- 优雅的确认对话框

 测试覆盖:
- 单元测试和集成测试
- 业务逻辑验证
- API接口测试

 技术栈:
- 后端: Rust + Tauri + SQLite
- 前端: React + TypeScript + TailwindCSS
- 状态管理: Zustand
- 测试: Vitest + Rust测试框架

 配置更新:
- 更新数据库迁移脚本
- 完善测试配置
- 优化构建流程
2025-07-15 12:50:30 +08:00
imeepos 9f222b562d feat: 模板详情弹框UI/UX全面优化
视觉设计优化:
- 重新设计信息架构,按重要性分层展示
- 优化颜色系统,减少视觉噪音
- 统一间距和字体层次,提升可读性
- 使用渐变背景和卡片设计增强视觉层次

 交互体验改进:
- 实现渐进披露,核心信息优先展示
- 添加可折叠区域,减少信息密度
- 优化状态指示器,更清晰的文件状态展示
- 改进匹配规则编辑器的位置和样式

 响应式适配:
- 移动端友好的布局设计
- 自适应网格系统
- 触摸友好的交互元素
- 优化小屏幕下的信息展示

 信息架构重构:
- 概览页:核心信息卡片 + 可折叠技术详情
- 素材页:主要信息 + 可展开详细信息
- 轨道页:轨道概览 + 片段详情 + 可展开属性

遵循frontend-developer规范,提升用户体验
2025-07-15 10:33:05 +08:00
imeepos 73c2187757 feat: 添加[随机匹配]选项到TemplateSegment匹配规则
- 在Rust后端SegmentMatchingRule枚举中添加RandomMatch变体
- 更新TypeScript前端类型定义和SegmentMatchingRuleHelper工具函数
- 修改SegmentMatchingRuleEditor组件支持随机匹配选项
- 添加绿色样式标识随机匹配规则
- 添加完整的单元测试覆盖新功能

遵循promptx/tauri-desktop-app-expert开发规范
2025-07-15 10:19:06 +08:00
imeepos 05d29832b0 feat: 实现模板片段匹配规则功能并修复数据库迁移问题
新功能:
- 为TrackSegment添加匹配规则字段,支持固定素材和AI分类两种规则
- 实现SegmentMatchingRuleEditor组件,支持在模板详情页面编辑片段匹配规则
- 添加update_segment_matching_rule和get_segment_matching_rule API接口
- 扩展前端类型定义和服务函数以支持匹配规则操作

 修复:
- 修复数据库迁移逻辑导致每次重启清空素材和轨道数据的问题
- 为模板表和轨道片段表迁移添加条件检查,只在必要时执行
- 修正matching_rule字段的默认值格式,匹配Rust枚举序列化格式
- 完善轨道片段表重建时的字段迁移逻辑

 技术改进:
- 数据库schema更新,添加matching_rule列到track_segments表
- 优化数据库迁移性能,避免不必要的表重建操作
- 增强错误处理和日志输出,便于问题排查

 文件变更:
- 后端: template_service.rs, template.rs, database.rs, template_commands.rs, lib.rs
- 前端: SegmentMatchingRuleEditor.tsx, TemplateDetailModal.tsx, templateStore.ts, template.ts
2025-07-15 09:43:04 +08:00
imeepos be8c032158 fix: 时间显示精度问题 2025-07-15 09:08:37 +08:00
imeepos 0a0c281ef6 fix: 模板导入bug 2025-07-15 08:55:22 +08:00
imeepos 14d90b2254 fix: 模板移除project关联 2025-07-15 08:42:36 +08:00
imeepos 595d2f75fd fix: 修复模板导入的bug 2025-07-14 23:14:45 +08:00
imeepos 49c5b1a033 fix: 统一按钮样式 2025-07-14 22:12:39 +08:00
imeepos 2d88274c3a fix: 修复模板导入功能的关键问题
修复问题:
- 修复数据库状态格式不一致导致的列表显示错误
- 修复单个导入完成后统计信息显示为0的问题
- 修复日期时间解析错误导致的panic问题
- 修复所有unwrap()调用导致的潜在崩溃

 技术改进:
- 统一使用Debug格式保存和查询import_status
- 改进日期解析支持多种格式(RFC3339和SQLite格式)
- 优化进度监控逻辑,保留最后有效统计数据
- 完善错误处理,避免锁中毒和解析错误

 功能完善:
- 模板导入完成后正确显示'已完成'状态
- 统计信息准确显示成功/失败数量
- 进度监控稳定运行,无无限轮询问题
2025-07-14 21:50:29 +08:00
imeepos 939efd70d4 feat: 完善模板导入功能
新增功能:
- 添加详细的模板导入日志系统
- 实现全局进度存储机制
- 完善模板状态管理

 修复问题:
- 修复进度监控无限轮询问题
- 修复模板列表状态显示不正确问题
- 修复所有unwrap()导致的panic错误
- 修复外键约束失败问题

 改进:
- 优化素材上传逻辑,只上传视频/音频/图片
- 上传失败时自动跳过而不是中断导入
- 缺失文件时继续导入而不是失败
- 改进错误处理机制
2025-07-14 21:34:07 +08:00
imeepos b3321114ac docs: 添加 v0.1.9 发布说明 2025-07-14 18:41:56 +08:00
imeepos 3786c4f54f chore: 发布版本 0.1.9
- 完成项目一键AI分类功能开发
- 更新版本号到 0.1.9
- 更新 TODO.md 标记任务完成状态
2025-07-14 18:35:59 +08:00
imeepos a3a75973aa fix: build error 2025-07-14 18:32:58 +08:00
imeepos a204c07dc2 fix: 移除项目设置按钮 2025-07-14 18:30:11 +08:00
imeepos e77f18ed13 docs: 添加项目一键AI分类功能开发文档
- 详细说明功能实现和技术架构
- 包含完整的业务流程和测试结果
- 提供后续优化建议
2025-07-14 18:29:28 +08:00
imeepos eeeef4ead4 feat: 实现项目一键AI分类功能
- 添加ProjectBatchClassificationRequest和ProjectBatchClassificationResponse数据模型
- 在VideoClassificationService中实现create_project_batch_classification_tasks方法
- 添加start_project_batch_classification Tauri命令接口
- 在前端添加startProjectBatchClassification方法和相关类型定义
- 在项目详情页面添加一键AI分类按钮和队列状态监控
- 支持批量处理项目下所有符合条件的视频素材
- 集成现有的AI分类队列系统,确保兼容性
2025-07-14 18:26:03 +08:00