From 8dff7f8a910767dbb8a96ec5b41dbaccc41a9414 Mon Sep 17 00:00:00 2001 From: ShukeBta <272197458+ShukeBta@users.noreply.github.com> Date: Fri, 26 Jun 2026 23:28:04 +0800 Subject: [PATCH] move file manager parent navigation --- web/src/pages/FileManagerPage.tsx | 35 +++++++++++++++++----------- web/src/pages/FileManagerToolbar.tsx | 16 +------------ 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/web/src/pages/FileManagerPage.tsx b/web/src/pages/FileManagerPage.tsx index b94082b..fa14add 100644 --- a/web/src/pages/FileManagerPage.tsx +++ b/web/src/pages/FileManagerPage.tsx @@ -1,5 +1,5 @@ import { useCallback, useEffect, useMemo, useState } from 'react' -import { ChevronUp } from 'lucide-react' +import { ChevronUp, Home } from 'lucide-react' import { filesAPI, type FileEntry, type FileListing } from '../api/files' import { libraryAPI } from '../api/library' @@ -89,10 +89,7 @@ export function FileManagerPage() { setPath('')} - onParent={setPath} onRefresh={refresh} onRecursiveChange={setRecursive} /> @@ -166,16 +163,28 @@ export function FileManagerPage() { )} - {!loading && data?.path && data.parent && ( + {!loading && data?.path && (
- +
+ + {data.parent && ( + + )} +
{data.path} diff --git a/web/src/pages/FileManagerToolbar.tsx b/web/src/pages/FileManagerToolbar.tsx index 1d287c8..d81147d 100644 --- a/web/src/pages/FileManagerToolbar.tsx +++ b/web/src/pages/FileManagerToolbar.tsx @@ -1,34 +1,20 @@ -import { ChevronUp, Home, RefreshCw } from 'lucide-react' +import { RefreshCw } from 'lucide-react' type FileManagerToolbarProps = { currentPath?: string - parentPath?: string recursive: boolean - onRoot: () => void - onParent: (path: string) => void onRefresh: () => void onRecursiveChange: (value: boolean) => void } export function FileManagerToolbar({ currentPath, - parentPath, recursive, - onRoot, - onParent, onRefresh, onRecursiveChange, }: FileManagerToolbarProps) { return (
- - {parentPath && ( - - )}