feat: #132 #131 #130 #129 #128 改进多个Issue的用户体验

- #132 NFS支持:改进NFS提示信息,添加详细的挂载命令指引
- #131 S3重命名:改进S3目录重命名错误处理,提供更清晰的错误提示
- #130 WebDAV建议:添加WebDAV路径挂载提示,指导用户精确挂载
- #129 Mac FUSE-T:添加macOS fuse-t安全提示,指导用户解决内核扩展加载问题
- #128 百度网盘:改进Token错误检测和提示,帮助用户正确配置refresh_token
This commit is contained in:
VirtualHotBar
2026-06-02 03:08:19 +08:00
parent 0470261f74
commit fd2129bcc4
7 changed files with 58 additions and 6 deletions

View File

@@ -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",

View File

@@ -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": "添加任务",

View File

@@ -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": "添加任務",

View File

@@ -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() {
<Select.Option value="fuse-t">fuse-t</Select.Option>
<Select.Option value="macfuse">macfuse</Select.Option>
</Select>
{/* FUSE-T 安全提示 */}
{parameters.mountOpt.MountType === 'fuse-t' && (
<Alert
type="warning"
content={t('mac_fuse_t_security_tip')}
style={{ marginTop: '0.5rem' }}
/>
)}
</FormItem>
)}
<FormItem label={t('cache_strategy')}>
@@ -400,6 +413,14 @@ export default function AddMount_page() {
<Select.Option value="fuse-t">fuse-t</Select.Option>
<Select.Option value="macfuse">macfuse</Select.Option>
</Select>
{/* FUSE-T 安全提示 */}
{parameters.mountOpt.MountType === 'fuse-t' && (
<Alert
type="warning"
content={t('mac_fuse_t_security_tip')}
style={{ marginTop: '0.5rem' }}
/>
)}
</FormItem>
)}
</div>

View File

@@ -194,9 +194,27 @@ function AddStorage_page() {
{/* 存储介绍 */}
{storageTypeName ? (
<FormItem label={t('storage_introduce')}>
<Typography.Text>{t(storageInfo.description)}</Typography.Text>
</FormItem>
<>
<FormItem label={t('storage_introduce')}>
<Typography.Text>{t(storageInfo.description)}</Typography.Text>
</FormItem>
{/* WebDAV 路径提示 */}
{storageInfo.type.toLowerCase().includes('webdav') && (
<Alert
type="info"
content={t('webdav_path_tip')}
style={{ marginTop: '0.5rem' }}
/>
)}
{/* 百度网盘 Token 提示 */}
{storageInfo.type.toLowerCase().includes('baidunetdisk') && (
<Alert
type="info"
content={t('baidu_token_tip')}
style={{ marginTop: '0.5rem' }}
/>
)}
</>
) : (
searchStr && searchStr.toLowerCase().includes('nfs') && (
<Alert

View File

@@ -242,9 +242,12 @@ function ExplorerItem() {
fileInfo()
} catch (error) {
const errorMsg = error instanceof Error ? error.message : String(error)
// S3等对象存储不支持原生重命名,需要通过复制+删除实现
// S3等对象存储不支持原生重命名
if (errorMsg.includes('not supported') || errorMsg.includes('rename')) {
Message.error(t('rename_not_supported'))
} else if (isDir && (errorMsg.includes('DirMove') || errorMsg.includes('500') || errorMsg.includes('Internal Server Error'))) {
// S3目录重命名失败的特殊处理
Message.error(t('s3_rename_dir_not_supported'))
} else {
Message.error(t('rename_failed') + ': ' + errorMsg)
}

View File

@@ -173,7 +173,8 @@ async function getStorageSpace(name: string): Promise<StorageSpace> {
// 检测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错误
}