fix: 最终审查修复 — 数据安全、功能缺失、状态管理

Rust:
- save_paths 添加 Windows PATH 32767 字符上限检查防静默截断
- backup_registry 回退路径统一为 backup_base_dir() 三级链

Store:
- 新增 isSaving 并发守卫防止重复保存
- 保存失败详情通过 Promise.allSettled.reason 展示
- isModified 改为与上次保存快照比较(undo/redo 后准确反映状态)
- 批删除合并为单条撤销记录(N 次删除 → 1 次 Ctrl+Z 恢复)
- 保存失败/备份失败使用 i18n 键(消除硬编码中文)

UI:
- 拖拽添加改用 webkitGetAsEntry().isDirectory 校验文件夹
- Ctrl+F 快捷键聚焦搜索框
- handleClean 使用 is_valid_path_format(替代不完整的 inline 函数)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 00:48:43 +08:00
parent e6a2416271
commit b159407773
8 changed files with 118 additions and 67 deletions
+1
View File
@@ -39,6 +39,7 @@
"saving": "Saving...",
"saved": "Saved successfully",
"error": "Operation failed",
"warning_backup": "Backup creation failed, save will proceed without backup",
"deleted": "Deleted {{count}} path(s)",
"loaded": "Loaded {{sysCount}} system and {{userCount}} user paths",
"dragFolderOnly": "Only folders can be dropped",