|
@@ -89,6 +89,7 @@ export interface AssetGalleryProps {
|
|
|
className?: string;
|
|
className?: string;
|
|
|
onFilesDropped?: (files: File[]) => void;
|
|
onFilesDropped?: (files: File[]) => void;
|
|
|
bulkActions?: AssetBulkAction[];
|
|
bulkActions?: AssetBulkAction[];
|
|
|
|
|
+ displayBulkActions?: boolean;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export function AssetGallery({
|
|
export function AssetGallery({
|
|
@@ -102,6 +103,7 @@ export function AssetGallery({
|
|
|
className = '',
|
|
className = '',
|
|
|
onFilesDropped,
|
|
onFilesDropped,
|
|
|
bulkActions,
|
|
bulkActions,
|
|
|
|
|
+ displayBulkActions = true,
|
|
|
}: AssetGalleryProps) {
|
|
}: AssetGalleryProps) {
|
|
|
// State
|
|
// State
|
|
|
const [page, setPage] = useState(1);
|
|
const [page, setPage] = useState(1);
|
|
@@ -272,7 +274,9 @@ export function AssetGallery({
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
{/* Bulk actions bar */}
|
|
{/* Bulk actions bar */}
|
|
|
- <AssetBulkActions selection={selected} bulkActions={bulkActions} refetch={refetch} />
|
|
|
|
|
|
|
+ {displayBulkActions ? (
|
|
|
|
|
+ <AssetBulkActions selection={selected} bulkActions={bulkActions} refetch={refetch} />
|
|
|
|
|
+ ) : null}
|
|
|
|
|
|
|
|
<div
|
|
<div
|
|
|
{...getRootProps()}
|
|
{...getRootProps()}
|
|
@@ -291,7 +295,10 @@ export function AssetGallery({
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
- <div data-asset-gallery className="grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-3 p-1">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ data-asset-gallery
|
|
|
|
|
+ className="grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-3 p-1"
|
|
|
|
|
+ >
|
|
|
{isLoading ? (
|
|
{isLoading ? (
|
|
|
<div className="col-span-full flex justify-center py-12">
|
|
<div className="col-span-full flex justify-center py-12">
|
|
|
<Loader2 className="h-8 w-8 animate-spin text-primary" />
|
|
<Loader2 className="h-8 w-8 animate-spin text-primary" />
|