1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 15:54:39 +00:00

feat: optimize code

This commit is contained in:
杨国璇
2025-06-06 13:55:53 +08:00
parent 5639169c2b
commit 76377060b6
37 changed files with 610 additions and 579 deletions

View File

@@ -84,6 +84,7 @@ const TableFilesToolbar = ({ repoID }) => {
const isDescribableFile = canModifyRow && Utils.isDescriptionSupportedFile(fileName);
const isImage = Utils.imageCheck(fileName);
const isVideo = Utils.videoCheck(fileName);
const isPDF = Utils.pdfCheck(fileName);
const descriptionColumn = getColumnByKey(columns, PRIVATE_COLUMN_KEY.FILE_DESCRIPTION);
const aiOptions = [];
@@ -95,7 +96,7 @@ const TableFilesToolbar = ({ repoID }) => {
aiOptions.push(GENERATE_DESCRIPTION);
}
if (enableOCR && isImage) {
if (enableOCR && (isImage || isPDF)) {
aiOptions.push(OCR);
}