WanWanYun
0bb7bd5219
fix: 修复文件夹详情功能 + 添加文件夹分享
修复内容:
1. 【文件夹详情无反应】
- 问题: folder-info API中变量名冲突
- 原因: API参数名'path'与Node.js的'path'模块冲突
- 具体: 第1193行 `const itemPath = path.join(dirPath, item.name)`
这里的path被当作API参数(字符串)而不是模块
- 修复:
* API参数改为 `const { path: dirPath, folderName }`
* 使用dirPath替代path
* countFiles函数参数改为countDirPath避免混淆
- 效果: 查看详情功能现在正常工作
新功能:
2. 【文件夹分享】
- 移除分享功能的文件限制
- 右键菜单"分享"选项对文件和文件夹都显示
- 文件夹分享后可访问该文件夹下所有文件
- 与现有分享API完全兼容(share_type支持file和all)
技术细节:
- backend/server.js:
* 第1138行: path参数改为dirPath
* 第1186行: countFiles函数参数改为countDirPath
* 第1193行: 使用path.join正确引用模块
- frontend/app.html:
* 移除 `v-if="!contextMenuFile.isDirectory"` 限制
* 文件夹也显示"分享"菜单项
使用方式:
1. 右键文件夹 → "查看详情" → 显示大小、文件数、子文件夹数
2. 右键文件夹 → "分享" → 分享整个文件夹
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 00:15:43 +08:00
..
2025-11-10 21:50:16 +08:00
2025-11-16 00:15:43 +08:00
2025-11-16 00:07:21 +08:00
2025-11-11 13:08:52 +08:00
2025-11-13 22:13:50 +08:00
2025-11-14 16:04:17 +08:00