feat(cluster-folder-view): add conditional navigation rendering
- Introduce `showNavigation` prop to control the visibility of the navigation header and breadcrumbs in the ClusterFolderView component. - Update ClusterPage to set `showNavigation` to false, disabling navigation for specific use cases.
This commit is contained in:
parent
4e3c4a1277
commit
ddf5f1e9b8
|
|
@ -401,6 +401,7 @@ export default function ClusterPage({ params }: ClusterPageProps) {
|
||||||
onVideoClick={handleVideoClick}
|
onVideoClick={handleVideoClick}
|
||||||
onPhotoClick={handlePhotoClick}
|
onPhotoClick={handlePhotoClick}
|
||||||
onTextClick={handleTextClick}
|
onTextClick={handleTextClick}
|
||||||
|
showNavigation={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ interface ClusterFolderViewProps {
|
||||||
onVideoClick: (video: FileSystemItem) => void;
|
onVideoClick: (video: FileSystemItem) => void;
|
||||||
onPhotoClick: (photo: FileSystemItem, index: number) => void;
|
onPhotoClick: (photo: FileSystemItem, index: number) => void;
|
||||||
onTextClick: (text: FileSystemItem) => void;
|
onTextClick: (text: FileSystemItem) => void;
|
||||||
|
showNavigation?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ClusterFolderView({
|
export default function ClusterFolderView({
|
||||||
|
|
@ -59,7 +60,8 @@ export default function ClusterFolderView({
|
||||||
libraries: clusterLibraries,
|
libraries: clusterLibraries,
|
||||||
onVideoClick,
|
onVideoClick,
|
||||||
onPhotoClick,
|
onPhotoClick,
|
||||||
onTextClick
|
onTextClick,
|
||||||
|
showNavigation = true
|
||||||
}: ClusterFolderViewProps) {
|
}: ClusterFolderViewProps) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [currentPath, setCurrentPath] = useState<string | null>(null); // null = virtual root
|
const [currentPath, setCurrentPath] = useState<string | null>(null); // null = virtual root
|
||||||
|
|
@ -333,7 +335,8 @@ export default function ClusterFolderView({
|
||||||
// Render Folder View (using VirtualizedFolderGrid)
|
// Render Folder View (using VirtualizedFolderGrid)
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
{/* Custom Header with Breadcrumbs */}
|
{/* Custom Header with Breadcrumbs - only show if showNavigation is true */}
|
||||||
|
{showNavigation && (
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
|
|
@ -375,6 +378,7 @@ export default function ClusterFolderView({
|
||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Folder Grid */}
|
{/* Folder Grid */}
|
||||||
<VirtualizedFolderGrid
|
<VirtualizedFolderGrid
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue