directory back up (parent) button + drag entry into parent to move

This commit is contained in:
2025-07-30 17:25:10 +02:00
parent 2c834eb42b
commit 3b141cc7cd
18 changed files with 243 additions and 95 deletions

View File

@@ -28,9 +28,9 @@ export async function getWarrens(): Promise<Record<string, WarrenData>> {
export async function getWarrenDirectory(
warrenId: string,
path: string
): Promise<DirectoryEntry[]> {
): Promise<{ files: DirectoryEntry[]; parent: DirectoryEntry | null }> {
const { data, error } = await useFetch<
ApiResponse<{ files: DirectoryEntry[] }>
ApiResponse<{ files: DirectoryEntry[]; parent: DirectoryEntry | null }>
>(getApiUrl(`warrens/files/ls`), {
method: 'POST',
headers: getApiHeaders(),
@@ -44,9 +44,9 @@ export async function getWarrenDirectory(
throw error.value?.name;
}
const { files } = data.value.data;
const { files, parent } = data.value.data;
return files;
return { files, parent };
}
export async function createDirectory(