Commit Graph

3 Commits

Author SHA1 Message Date
VirtualHotBar
69f7e0b281 feat: implement multiple feature requests and bug fixes
Implemented features and fixes for the following issues:

- #74: Add rename storage feature with modal UI
- #109: Add temp file cleanup on startup with clear cache button
- #103: Optimize mount defaults for better performance (ReadAhead, DirCacheTime)
- #99/#86: Fix bidirectional sync with resync support for first run
- #131: Improve S3 rename error handling with better error messages
- #128: Add token expiration detection for Baidu cloud storage
- #129: Improve Mac FUSE-T mount error handling with detailed guidance
- #63: Add network share tip for Windows users
- #132: Add NFS support guidance (not directly supported, use Local storage)
- #88: Add startup password protection feature with lock on sleep option
- #72: Add password security improvements (hash storage)
- #67: Verify startHide feature already implemented correctly

New files:
- src/components/PasswordGuard.tsx: Startup password protection component
- src/utils/tempCleanup.ts: Temp file cleanup utility

Modified files:
- src-tauri/locales/en.json, zh-cn.json: Added i18n keys for new features
- src/app.tsx: Added PasswordGuard wrapper
- src/controller/mainInit.ts: Added temp cleanup on startup
- src/page/storage/storage.tsx: Added rename button and modal
- src/page/setting/components/GeneralSettings.tsx: Added password settings
- src/page/setting/components/AdvancedSettings.tsx: Added clear cache button
- src/page/storage/add.tsx: Added NFS support guidance
- src/page/mount/mount.tsx: Added network share tip
- src/repositories/mount/mountHelpers.ts: Improved mount error handling
- src/services/storage/TransferService.ts: Added resync support for bisync
- src/services/storage/StorageManager.ts: Added renameStorage and token detection
- src/type/config.d.ts: Added security settings to NMConfig
- src/controller/storage/mount/parameters/defaults.ts: Optimized mount defaults
- src/controller/task/runner.ts: Added resync parameter for bisync tasks
2026-06-02 01:32:54 +08:00
VirtualHotBar
b7d2b78e43 feat(repository): 实现数据访问抽象层并统一日志服务
- 完成 Repository 层实现,包括 BaseRepository、ConfigRepository、
  StorageRepository、MountRepository、TaskRepository
- 迁移所有 console.log/warn/error 到统一的 LoggerService
- 实现 MountRepository 的原子性更新逻辑,支持配置变更检测
- 实现 TaskRepository 的任务状态管理和生命周期控制
- 添加完整的单元测试覆盖 StorageManager、FileManager、
  TransferService 及各 Repository 模块
- 新增 CacheManager 的 localStorage 持久化功能
- 优化 ChunkTransferService 的并发控制和信号量实现
- 修复 MountRepository ID 生成逻辑中的特殊字符冲突问题
- 实现 TaskRepository.update 的真正就地更新而非删除重建
- 补充完整的类型定义文档和 JSDoc 注释
2026-04-07 00:31:16 +08:00
VirtualHotBar
a956e7b96a refactor(arch): restructure codebase with modular services and state management
Introduce comprehensive architectural improvements including service layer, state management stores, repository pattern, unified logging and error handling, and test infrastructure.

Key changes:
- Add service layer with ConfigService, LoggerService, ErrorService, and storage services (StorageManager, FileManager, TransferService)
- Implement Zustand stores for rclone, openlist, mount, storage, settings, stats, and task state management
- Introduce repository layer with BaseRepository and specific implementations (ConfigRepository, StorageRepository)
- Add unified logging system with structured output, levels, and persistence
- Implement centralized error handling with categorization, user-friendly messages, and recovery
- Create component library with ErrorBoundary and reusable UI components
- Add comprehensive test suite with Vitest, setup, and utilities
- Migrate from monolithic files to modular structure with proper separation of concerns
- Update build configuration, add vitest.config.ts, and enhance TypeScript paths
- Remove deprecated files (tauriUpdater.ts, test.ts, storageRepository.ts, etc.)

BREAKING CHANGE: Major API and structural changes require updates to component imports and state access patterns. Migration guide available in docs/LOGGING_MIGRATION_GUIDE.md.
2026-04-05 10:33:27 +08:00