feat(remote): 支持浏览系统磁盘目录

- 添加 getDrives() 方法获取磁盘驱动器列表
- 修改 browseDirectory() 支持 allowSystem 参数浏览系统路径
- 添加 /api/files/drives 路由
- 修改前端 RemoteFilePanel 支持显示驱动器和系统目录浏览
This commit is contained in:
2026-03-09 19:21:09 +08:00
parent 49bf8a97d2
commit d65b3e7909
5 changed files with 200 additions and 79 deletions

View File

@@ -73,6 +73,7 @@ export class RemoteService {
serverHost: deviceConfig.serverHost || '',
desktopPort: deviceConfig.desktopPort || 3000,
gitPort: deviceConfig.gitPort || 3001,
password: deviceConfig.password || '',
}
} catch {
return {
@@ -81,6 +82,7 @@ export class RemoteService {
serverHost: '',
desktopPort: 3000,
gitPort: 3001,
password: '',
}
}
})
@@ -114,6 +116,7 @@ export class RemoteService {
serverHost: device.serverHost,
desktopPort: device.desktopPort,
gitPort: device.gitPort,
password: device.password || '',
}
await fs.writeFile(deviceConfigPath, JSON.stringify(deviceConfig, null, 2), 'utf-8')
}