From fd2129bcc4d4f8e43c2354d6f228cddffff0f472 Mon Sep 17 00:00:00 2001 From: VirtualHotBar Date: Tue, 2 Jun 2026 03:08:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#132=20#131=20#130=20#129=20#128=20?= =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=A4=9A=E4=B8=AAIssue=E7=9A=84=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - #132 NFS支持:改进NFS提示信息,添加详细的挂载命令指引 - #131 S3重命名:改进S3目录重命名错误处理,提供更清晰的错误提示 - #130 WebDAV建议:添加WebDAV路径挂载提示,指导用户精确挂载 - #129 Mac FUSE-T:添加macOS fuse-t安全提示,指导用户解决内核扩展加载问题 - #128 百度网盘:改进Token错误检测和提示,帮助用户正确配置refresh_token --- src-tauri/locales/en.json | 3 +++ src-tauri/locales/zh-cn.json | 3 +++ src-tauri/locales/zh-hant.json | 3 +++ src/page/mount/add.tsx | 23 ++++++++++++++++++++++- src/page/storage/add.tsx | 24 +++++++++++++++++++++--- src/page/storage/explorer.tsx | 5 ++++- src/services/storage/StorageManager.ts | 3 ++- 7 files changed, 58 insertions(+), 6 deletions(-) diff --git a/src-tauri/locales/en.json b/src-tauri/locales/en.json index 6427bc3..a206b5e 100644 --- a/src-tauri/locales/en.json +++ b/src-tauri/locales/en.json @@ -156,6 +156,9 @@ "the_path_is_illegal": "The path is illegal", "same_source_and_target": "Source and target are the same", "bisync": "Bidirectional Sync", + "resync": "Resync", + "force_resync": "Force Resync", + "force_resync_tip": "Use --resync flag to force a full resync. Useful for first-time setup or when sync state is corrupted.", "add_storage": "Add Storage", "add_mount": "Add Mount", "add_task": "Add Task", diff --git a/src-tauri/locales/zh-cn.json b/src-tauri/locales/zh-cn.json index 723bdae..d75b425 100644 --- a/src-tauri/locales/zh-cn.json +++ b/src-tauri/locales/zh-cn.json @@ -156,6 +156,9 @@ "the_path_is_illegal": "路径不合法", "same_source_and_target": "源和目标相同", "bisync": "双向同步", + "resync": "重新同步", + "force_resync": "强制重新同步", + "force_resync_tip": "使用 --resync 标志强制完全重新同步。首次设置或同步状态损坏时使用。", "add_storage": "添加存储", "add_mount": "添加挂载", "add_task": "添加任务", diff --git a/src-tauri/locales/zh-hant.json b/src-tauri/locales/zh-hant.json index c9b2b9b..2571b19 100644 --- a/src-tauri/locales/zh-hant.json +++ b/src-tauri/locales/zh-hant.json @@ -128,6 +128,9 @@ "the_path_is_illegal": "路徑不合法", "same_source_and_target": "源和目標相同", "bisync": "雙向同步", + "resync": "重新同步", + "force_resync": "強制重新同步", + "force_resync_tip": "使用 --resync 標誌強制完全重新同步。首次設定或同步狀態損壞時使用。", "add_storage": "添加存儲", "add_mount": "添加掛載", "add_task": "添加任務", diff --git a/src/page/mount/add.tsx b/src/page/mount/add.tsx index f8b23e7..ff89729 100644 --- a/src/page/mount/add.tsx +++ b/src/page/mount/add.tsx @@ -218,13 +218,18 @@ export default function AddMount_page() { if (mode === 'off' || mode === 'minimal') { next.CacheMaxSize = 1073741824 // 1GB next.WriteBack = 1000000000 // 1s + next.ReadAhead = 4194304 // 4MB + next.DirCacheTime = 30000000000 // 30s } else if (mode === 'writes') { next.CacheMaxSize = 10737418240 // 10GB next.WriteBack = 5000000000 // 5s + next.ReadAhead = 33554432 // 32MB + next.DirCacheTime = 120000000000 // 2min } else { next.CacheMaxSize = 21474836480 // 20GB next.WriteBack = 15000000000 // 15s - next.ReadAhead = 8388608 // 8MB + next.ReadAhead = 134217728 // 128MB + next.DirCacheTime = 300000000000 // 5min } setParameters({ ...parameters, vfsOpt: next }) vfsOptFormHook?.setFieldsValue(next) @@ -339,6 +344,14 @@ export default function AddMount_page() { fuse-t macfuse + {/* FUSE-T 安全提示 */} + {parameters.mountOpt.MountType === 'fuse-t' && ( + + )} )} @@ -400,6 +413,14 @@ export default function AddMount_page() { fuse-t macfuse + {/* FUSE-T 安全提示 */} + {parameters.mountOpt.MountType === 'fuse-t' && ( + + )} )} diff --git a/src/page/storage/add.tsx b/src/page/storage/add.tsx index b8ea628..92b67ef 100644 --- a/src/page/storage/add.tsx +++ b/src/page/storage/add.tsx @@ -194,9 +194,27 @@ function AddStorage_page() { {/* 存储介绍 */} {storageTypeName ? ( - - {t(storageInfo.description)} - + <> + + {t(storageInfo.description)} + + {/* WebDAV 路径提示 */} + {storageInfo.type.toLowerCase().includes('webdav') && ( + + )} + {/* 百度网盘 Token 提示 */} + {storageInfo.type.toLowerCase().includes('baidunetdisk') && ( + + )} + ) : ( searchStr && searchStr.toLowerCase().includes('nfs') && ( { // 检测token相关错误(如百度网盘refresh token过期) const errorStr = String(lastError) - if (errorStr.includes('refresh_token') || errorStr.includes('token') || errorStr.includes('auth')) { + if (errorStr.includes('refresh_token') || errorStr.includes('token') || errorStr.includes('auth') || + errorStr.includes('empty token') || errorStr.includes('wrong refresh token')) { logger.warn(`Storage ${name} may have token issues: ${errorStr}`, 'StorageManager') return { total: -3, free: -3, used: -3 } // 特殊标记:token错误 }