1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 07:22:34 +00:00

fix: enable config (#7919)

Co-authored-by: 杨国璇 <ygx@MacBookPro.lan>
This commit is contained in:
杨国璇
2025-06-11 20:54:36 +08:00
committed by GitHub
parent 7aa257ce09
commit 6d546f5067
16 changed files with 24 additions and 43 deletions

View File

@@ -3,8 +3,7 @@ import metadataAPI from '../metadata/api';
import { Utils } from '../utils/utils';
import toaster from '../components/toast';
import Loading from '../components/loading';
const { enableSeafileAI, enableSeafileOCR } = window.app.config;
import { enableSeafileAI } from '../utils/constants';
// This hook provides content related to seahub interaction, such as whether to enable extended attributes
const MetadataStatusContext = React.createContext(null);
@@ -65,7 +64,7 @@ export const MetadataStatusProvider = ({ repoID, repoInfo, hideMetadataView, sta
setEnableTags(enableTags);
setTagsLang(tagsLang || 'en');
setDetailsSettings(JSON.parse(detailsSettings));
setEnableOCR(enableSeafileOCR && enableOCR);
setEnableOCR(enableSeafileAI && enableOCR);
setEnableFaceRecognition(enableSeafileAI && enableFaceRecognition);
setEnableMetadata(enableMetadata);
setLoading(false);