Commit Graph

7 Commits

Author SHA1 Message Date
69ab0e8000 feat: 实现动态密码系统,消除硬编码
核心改动:
1. db.rs - 默认密码从环境变量读取或自动生成
   - 优先级: MOMENTRY_DEFAULT_PASSWORD > 自动生成
   - 格式: demo_<timestamp> 或自定义
   - 首次创建时打印密码到控制台

2. main.rs - SMB 服务密码动态化
   - 从 SMB_PASSWORD 或 MOMENTRY_DEFAULT_PASSWORD 读取
   - 支持自定义 SMB 用户名

3. user_tool.rs - 新增用户管理工具
   - list: 列出所有用户
   - create: 创建新用户
   - set-password: 修改密码
   - delete: 删除用户
   - init-demo: 初始化 demo 用户

4. install.sh - 安装时自动生成密码
   - 生成随机密码: demo_$(openssl rand -hex 4)
   - 保存到 .env 文件
   - 初始化数据库

5. .env.template - 新增密码配置
   - MOMENTRY_DEFAULT_PASSWORD
   - SMB_USER / SMB_PASSWORD

安全改进:
- 消除硬编码密码 'demo123'
- 每次安装密码唯一
- 密码哈希存储 (Argon2id)
- 支持自定义强密码

文档:
- docs/DEFAULT_PASSWORD_SYSTEM.md 完整说明
2026-10-12 14:25:47 +08:00
c586b5f994 fix: 暂时禁用 system-stats validation 功能以修复编译错误
问题:
- proxy.rs 调用 validate::run_validation
- validate.rs 导入 SystemStatsResponse 的路径在不同的二进制模块中不同
- 导致编译错误

临时修复:
- 注释掉 proxy.rs 中对 validate 模块的调用
- 在 system-stats API 中直接返回 stats 数据,不进行 validation
- 保持基本功能可用

未来改进:
- 需要重构模块结构,使 SystemStatsResponse 在所有模块中都可访问
- 或者使用条件编译处理不同的导入路径
2026-10-08 00:22:56 +08:00
f3d75ebce8 feat: Library 批量注册 + PeopleView 修复 + 国际化
Library:
- 添加 checkbox 和鼠标框选功能
- Unregistered 卡片添加快速注册按钮
- 状态标签移至左下方,人脸图标移至左侧中间
- Deep Scan 改为 unregister -> register -> process
- 完整国际化(日语、繁体中文、英语)

PeopleView:
- 修复卡片不显示问题(使用 get_file_traces API)
- 移除对 identity_id 字段的依赖

其他:
- 添加日语语言包
- 添加 useDragSelect composable
- 新增文档:Face Bbox Null Bug Report
2026-10-01 00:42:13 +08:00
7b60ca3d2d feat: add face filter components and integration guide
- useFaceFilter composable: manages face filtering state and API calls
- FaceFilterPanel component: UI for filtering controls
- FaceCard component: text-only face display card
- Integration guide: step-by-step guide for integrating into PeopleView

Implements hybrid filtering mode with:
- Instant mode: client-side filtering (5-10ms)
- Backend mode: server-side complex filtering
- Hybrid mode: backend + instant filtering (AND)

Uses actual Core API endpoints:
- GET /file/{uuid}/faces
- POST /file/{uuid}/faces/filter
- GET /file/{uuid}/face/{faceId}/filter-report
- GET /file/{uuid}/filter-stats

Preferences stored in localStorage.
2026-08-09 21:24:52 +08:00
cb7e1ba0ba fix: resolve TypeScript compilation errors
Fixes:
- VideoPlayer.vue: restore allTags, filteredMarks, marksByTag (removed by mistake)
- PeopleView.vue: fix frameTime scope in playFaceDetailVideo catch block
- Both errors caused white screen on build failure

Root cause:
1. visibleTags duplicate declaration (old + new logic)
2. frameTime undefined in catch block (scope issue)

Solution:
1. Keep allTags/filteredMarks/marksByTag (needed in template)
2. Keep visibleTags (new logic for processor toggles)
3. Move frameTime calculation to correct scope in catch block
2026-07-24 23:33:40 +08:00
5951aca086 feat: frame-based positioning and mark system foundation
Core Changes:
- Fix SearchView to use start_frame/end_frame directly (no time*fps conversion)
- Add hard_delete support to delete_trace API
- VideoPlayer: Main timeline + Mark system foundation
- Proxy: Add local routes for auth, media, identity-matches, cluster-results
- Add .gitignore to exclude build artifacts and dependencies

Design Documents:
- Multi-track Mark system design (.opencode/plans/)
- Video editing positioning standards research

Files Modified:
- src/views/SearchView.vue: Frame positioning, ensureMinDuration (240 frames)
- src/views/PeopleView.vue: batchDeleteGroups with hard_delete
- src/api/index.ts: delete_trace with hard_delete body
- src/components/VideoPlayer.vue: Timeline + Mark UI
- src-tauri/src/proxy.rs: New local routes
- AGENTS.md: Update documentation
2026-07-24 20:19:47 +08:00
7855983dc1 feat: bind/unbind by id, video streaming proxy, unmute default, library refresh, hamburger click-outside
- Core API: bind/unbind accept id (integer PK) when face_id is null
- Tauri proxy: stream video responses instead of buffering for seek bar
- VideoPlayer: remove muted attribute, unmute by default
- LibraryView: call invalidateFiles() before ensureFiles() on register/unregister
- PeopleView: close sort panel on click-outside, not just hamburger toggle
- bind_face: prefer face_id, fallback to id when face_id is null
2026-06-18 22:24:03 +08:00