diff --git a/components/FolderGridLayout.tsx b/components/FolderGridLayout.tsx index f0f7f73..a895094 100644 --- a/components/FolderGridLayout.tsx +++ b/components/FolderGridLayout.tsx @@ -81,7 +81,7 @@ const FolderGridLayout = ({ checked={totalSelected} onChange={toggleTotalSelected} indeterminate={true} - title={'Select files'} + title={'Select all files'} /> {totalGenerating ? ( @@ -98,76 +98,78 @@ const FolderGridLayout = ({ -
+
{folderChildren.map((c: OdFolderChildren) => ( - - -
- {c.folder ? ( -
+
+
+ {c.folder ? ( +
+ { + clipboard.copy(`${getBaseUrl()}${path === '/' ? '' : path}/${encodeURIComponent(c.name)}`) + toast('Copied folder permalink.', { icon: '👌' }) + }} + > + + + {folderGenerating[c.id] ? ( + + ) : ( { - clipboard.copy(`${getBaseUrl()}${path === '/' ? '' : path}/${encodeURIComponent(c.name)}`) - toast('Copied folder permalink.', { icon: '👌' }) + const p = `${path === '/' ? '' : path}/${encodeURIComponent(c.name)}` + handleFolderDownload(p, c.id, c.name)() }} - > - - - {folderGenerating[c.id] ? ( - - ) : ( - { - const p = `${path === '/' ? '' : path}/${encodeURIComponent(c.name)}` - handleFolderDownload(p, c.id, c.name)() - }} - > - - - )} -
- ) : ( -
- )} -
+ + )} +
+ ) : ( +
+ { + clipboard.copy( + `${getBaseUrl()}/api?path=${path === '/' ? '' : path}/${encodeURIComponent(c.name)}&raw=true` + ) + toast.success('Copied raw file permalink.') + }} + > + + + + + +
+ )} +
-
- {!c.folder && !(c.name === '.password') && ( - toggleItemSelected(c.id)} - title="Select file" - /> - )} -
+
+ {!c.folder && !(c.name === '.password') && ( + toggleItemSelected(c.id)} + title="Select file" + /> + )} +
- - - + + + + + +
))}