mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-06-29 18:15:55 +08:00
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:
@@ -55,6 +55,11 @@ export function useKeyboard(actions: KeyboardActions) {
|
||||
if (!isAdmin) return;
|
||||
e.preventDefault();
|
||||
a.onDelete();
|
||||
} else if (ctrl && e.key === 'f') {
|
||||
e.preventDefault();
|
||||
const searchInput = document.querySelector<HTMLInputElement>('input[placeholder]');
|
||||
searchInput?.focus();
|
||||
searchInput?.select();
|
||||
} else if (e.key === 'F1') {
|
||||
e.preventDefault();
|
||||
a.onHelp();
|
||||
|
||||
Reference in New Issue
Block a user