Files
spacedrive/packages/interface/src/components/Sources/SourcePathBar.tsx
James Pine 907ab4e267 Add archive sources UI with full Rust integration
- Create core/src/data/ module with SourceManager wrapping sd-archive Engine
- Add Sources to GroupType and Source to ItemType enums
- Add default Sources group to new library creation
- Register source operations: create, list, get, delete, sync, list_items
- Register adapter operations: list, config, update
- Add bundled adapter sync from workspace adapters/ directory
- Add adapter update system with BLAKE3 change detection and backup/rollback
- Frontend: Sources home, source detail with virtualized list, adapters screen
- Frontend: SourcesGroup sidebar, SpaceGroup dispatch, spaceItemUtils
- Frontend: TopBar integration (path bar, search, sync, actions menu)
- Frontend: Tab title sync, adapter icon lookup hook
- Regenerate TypeScript types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 03:24:53 -07:00

40 lines
1.0 KiB
TypeScript

import { CaretRight, Database } from "@phosphor-icons/react";
import { useNavigate } from "react-router-dom";
interface SourcePathBarProps {
sourceName: string;
itemCount: number;
}
export function SourcePathBar({
sourceName,
itemCount,
}: SourcePathBarProps) {
const navigate = useNavigate();
return (
<div
className="border-app-line/50 bg-app-overlay/80 flex h-8 items-center gap-1.5 rounded-full border px-3 backdrop-blur-xl"
>
<Database size={14} className="text-ink-faint shrink-0" />
<button
onClick={() => navigate("/sources")}
className="text-sidebar-inkDull hover:text-sidebar-ink whitespace-nowrap text-xs font-medium transition-colors"
>
Sources
</button>
<CaretRight size={12} className="text-ink-faint shrink-0 opacity-50" />
<span className="text-sidebar-ink whitespace-nowrap text-xs font-medium">
{sourceName}
</span>
<span className="text-ink-faint ml-1 whitespace-nowrap text-[11px]">
{itemCount.toLocaleString()} items
</span>
</div>
);
}