mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-04 20:46:37 +08:00
move file manager parent navigation
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user