move file manager parent navigation

This commit is contained in:
ShukeBta
2026-06-26 23:28:04 +08:00
parent 2e660325d6
commit 8dff7f8a91
2 changed files with 23 additions and 28 deletions
+1 -15
View File
@@ -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 (
<div className="flex flex-wrap items-center gap-2">
<button className="neon-button !px-3 !py-1 !text-xs" onClick={onRoot} title="返回根列表">
<Home size={14} /> 根
</button>
{parentPath && (
<button className="neon-button !px-3 !py-1 !text-xs" onClick={() => onParent(parentPath)}>
<ChevronUp size={14} /> 上一级
</button>
)}
<button className="neon-button !px-3 !py-1 !text-xs" onClick={onRefresh}>
<RefreshCw size={14} /> 刷新
</button>