1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 21:30:39 +00:00

update metadata loading ui (#7080)

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries
2024-11-22 16:15:48 +08:00
committed by GitHub
parent c11c990e1d
commit 24e25248c0
6 changed files with 43 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ export const MetadataProvider = ({ repoID, currentRepoInfo, hideMetadataView, se
return window.app.pageOptions.enableMetadataManagement;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [window.app.pageOptions.enableMetadataManagement, currentRepoInfo]);
const isEmptyRepo = useMemo(() => currentRepoInfo.file_count === 0, [currentRepoInfo]);
const [enableMetadata, setEnableExtendedProperties] = useState(false);
const [enableFaceRecognition, setEnableFaceRecognition] = useState(false);
@@ -215,6 +216,7 @@ export const MetadataProvider = ({ repoID, currentRepoInfo, hideMetadataView, se
return (
<MetadataContext.Provider value={{
isEmptyRepo,
enableMetadata,
updateEnableMetadata,
enableFaceRecognition,