feat: file explorer (#1)

* feat: list volume files backend

* feat: file tree component

* feat: load sub folders

* fix: filetree wrong opening order

* temp: open / close icons

* chore: remove all hc files when cleaning

* chore: file-tree optimizations
This commit is contained in:
Nico
2025-10-06 19:46:49 +02:00
committed by GitHub
parent a5e0fb6aa2
commit 1e3419c250
10 changed files with 707 additions and 2 deletions

View File

@@ -9,7 +9,9 @@ import {
getVolumeDto,
healthCheckDto,
type ListContainersResponseDto,
type ListFilesResponseDto,
type ListVolumesResponseDto,
listFilesDto,
listVolumesDto,
mountVolumeDto,
testConnectionBody,
@@ -118,4 +120,16 @@ export const volumeController = new Hono()
const { error, status } = await volumeService.checkHealth(name);
return c.json({ error, status }, 200);
})
.get("/:name/files", listFilesDto, async (c) => {
const { name } = c.req.param();
const subPath = c.req.query("path");
const result = await volumeService.listFiles(name, subPath);
const response = {
files: result.files,
path: result.path,
} satisfies ListFilesResponseDto;
return c.json(response, 200);
});