diff --git a/bewcloud.config.sample.ts b/bewcloud.config.sample.ts index 84ffba8..dfbe56b 100644 --- a/bewcloud.config.sample.ts +++ b/bewcloud.config.sample.ts @@ -18,6 +18,7 @@ const config: PartialDeep = { // files: { // rootPath: 'data-files', // allowPublicSharing: false, // If true, public file sharing will be allowed (still requires a user to enable sharing for a given file or directory) + // allowDirectoryDownloads: true, // If true, directories can be downloaded as zip files // }, // core: { // enabledApps: ['news', 'notes', 'photos', 'expenses', 'contacts', 'calendar'], // dashboard and files cannot be disabled diff --git a/components/files/ListFiles.tsx b/components/files/ListFiles.tsx index 371e526..b4077a9 100644 --- a/components/files/ListFiles.tsx +++ b/components/files/ListFiles.tsx @@ -18,6 +18,7 @@ interface ListFilesProps { onClickDeleteFile?: (parentPath: string, name: string) => Promise; onClickCreateShare?: (filePath: string) => void; onClickOpenManageShare?: (fileShareId: string) => void; + onClickDownloadDirectory?: (parentPath: string, name: string) => void; isShowingNotes?: boolean; isShowingPhotos?: boolean; fileShareId?: string; @@ -39,6 +40,7 @@ export default function ListFiles( onClickDeleteFile, onClickCreateShare, onClickOpenManageShare, + onClickDownloadDirectory, isShowingNotes, isShowingPhotos, fileShareId, @@ -165,10 +167,26 @@ export default function ListFiles( typeof onClickOpenMoveDirectory === 'undefined') ? null : ( -
+
+ {typeof onClickDownloadDirectory === 'undefined' ? null : ( + + )}