mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-07 13:56:37 +08:00
refactor: split modules and harden scraping workflows
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { FolderOpen } from 'lucide-react'
|
||||
|
||||
type FileRoot = {
|
||||
label: string
|
||||
path: string
|
||||
}
|
||||
|
||||
type FileBrowserRootsProps = {
|
||||
roots: FileRoot[]
|
||||
onOpen: (path: string) => void
|
||||
}
|
||||
|
||||
export function FileBrowserRoots({ roots, onOpen }: FileBrowserRootsProps) {
|
||||
return (
|
||||
<div className="grid gap-3 md:grid-cols-2 lg:grid-cols-3">
|
||||
{roots.map((root) => (
|
||||
<button
|
||||
key={root.path}
|
||||
onClick={() => onOpen(root.path)}
|
||||
className="glass-panel flex items-center gap-3 text-left transition hover:border-primary-400/40"
|
||||
>
|
||||
<FolderOpen size={20} className="text-brand-500" />
|
||||
<div>
|
||||
<p className="font-mono text-sm text-ink-600">{root.label}</p>
|
||||
<p className="font-mono text-xs text-ink-50">{root.path}</p>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user