mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
feat: metadata status callback (#7716)
* feat: metadata status callback * feat: optimzie code --------- Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
@@ -2245,6 +2245,14 @@ class LibContentView extends React.Component {
|
||||
this.setState({ isDirentSelected });
|
||||
};
|
||||
|
||||
metadataStatusCallback = ({ enableMetadata, enableTags }) => {
|
||||
if (enableMetadata && enableTags) {
|
||||
this.updateUsedRepoTags();
|
||||
return;
|
||||
}
|
||||
this.clearRepoTags();
|
||||
};
|
||||
|
||||
render() {
|
||||
const { repoID } = this.props;
|
||||
let { currentRepoInfo, userPerm, isCopyMoveProgressDialogShow, isDeleteFolderDialogOpen, errorMsg,
|
||||
@@ -2320,7 +2328,7 @@ class LibContentView extends React.Component {
|
||||
}
|
||||
const detailDirent = currentDirent || currentNode?.object || null;
|
||||
return (
|
||||
<MetadataStatusProvider repoID={repoID} repoInfo={currentRepoInfo} hideMetadataView={this.hideMetadataView} updateUsedRepoTags={this.updateUsedRepoTags} clearRepoTags={this.clearRepoTags} >
|
||||
<MetadataStatusProvider repoID={repoID} repoInfo={currentRepoInfo} hideMetadataView={this.hideMetadataView} statusCallback={this.metadataStatusCallback} >
|
||||
<TagsProvider repoID={repoID} currentPath={path} repoInfo={currentRepoInfo} selectTagsView={this.onTreeNodeClick} >
|
||||
<MetadataProvider repoID={repoID} currentPath={path} repoInfo={currentRepoInfo} selectMetadataView={this.onTreeNodeClick} >
|
||||
<CollaboratorsProvider repoID={repoID}>
|
||||
|
Reference in New Issue
Block a user