diff --git a/components/FolderGridLayout.tsx b/components/FolderGridLayout.tsx index 503256d..f0f7f73 100644 --- a/components/FolderGridLayout.tsx +++ b/components/FolderGridLayout.tsx @@ -3,9 +3,12 @@ import type { OdFolderObject } from '../types' import Link from 'next/link' import emojiRegex from 'emoji-regex' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { useClipboard } from 'use-clipboard-copy' import { getFileIcon } from '../utils/getFileIcon' +import { getBaseUrl } from '../utils/getBaseUrl' import { formatModifiedDateTime } from '../utils/fileDetails' +import { Checkbox, Downloading } from './FileListing' type OdFolderChildren = OdFolderObject['value'][number] @@ -25,7 +28,7 @@ const GridItem = ({ c }: { c: OdFolderChildren }) => { return (
-
+
{thumbnail ? ( // eslint-disable-next-line @next/next/no-img-element {c.name} @@ -67,15 +70,106 @@ const FolderGridLayout = ({ handleFolderDownload, toast, }) => { + const clipboard = useClipboard() + return ( -
- {folderChildren.map((c: OdFolderChildren) => ( - - - - - - ))} +
+
+
{folderChildren.length} items
+
+ + {totalGenerating ? ( + + ) : ( + + )} +
+
+ +
) } diff --git a/components/SwitchLayout.tsx b/components/SwitchLayout.tsx index fbdbe5c..f4428c4 100644 --- a/components/SwitchLayout.tsx +++ b/components/SwitchLayout.tsx @@ -27,7 +27,7 @@ export const SwitchLayout = () => { - + {layouts.map(layout => (