mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 08:07:17 +08:00
feat: add on-demand folder size calculation in file manager (#1201)
* Initial plan * feat: add folder size calculation feature with "Calculate" link - Backend: Add Size API to calculate directory size - Backend: Modify formatDir to return empty size for directories - Frontend: Show "Calculate" link for directories instead of size - Frontend: Add loading spinner during calculation - Frontend: Cache calculated sizes until path changes - Add translations for Calculate and Failed to calculate size Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * fix: lint * fix: 优化 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> Co-authored-by: 耗子 <haozi@loli.email>
This commit is contained in:
@@ -22,6 +22,8 @@ export default {
|
||||
http.Post('/file/remote_download', { path, url }),
|
||||
// 获取文件信息
|
||||
info: (path: string): any => http.Get('/file/info', { params: { path } }),
|
||||
// 获取目录/文件大小
|
||||
size: (path: string): any => http.Get('/file/size', { params: { path } }),
|
||||
// 修改文件权限
|
||||
permission: (path: string, mode: string, owner: string, group: string): any =>
|
||||
http.Post('/file/permission', { path, mode, owner, group }),
|
||||
|
||||
Reference in New Issue
Block a user