diff --git a/Dockerfile b/Dockerfile index 40f2e8b..2a0f7ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM denoland/deno:ubuntu-2.5.2 EXPOSE 8000 -RUN apt-get update && apt-get install -y make +RUN apt-get update && apt-get install -y make zip WORKDIR /app diff --git a/bewcloud.config.sample.ts b/bewcloud.config.sample.ts index 84ffba8..a22412e 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: false, // 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 : ( + + )}