1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 02:51:00 +00:00

list repo tags regardless of whether metadata tag is enabled (#7752)

Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
Aries 2025-04-21 18:25:43 +08:00 committed by GitHub
parent 63f51d6d2a
commit 1cf26c3d2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 16 deletions

View File

@ -77,9 +77,9 @@ export const MetadataStatusProvider = ({ repoID, repoInfo, hideMetadataView, sta
}, [repoID, enableMetadataManagement]);
useEffect(() => {
statusCallback && statusCallback({ enableMetadata, enableTags });
statusCallback && statusCallback({ enableTags });
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [enableMetadata, enableTags]);
}, [enableTags]);
const updateEnableMetadata = useCallback((newValue) => {
if (newValue === enableMetadata) return;

View File

@ -429,14 +429,6 @@ class LibContentView extends React.Component {
});
};
clearRepoTags = () => {
this.setState({
fileTags: [],
repoTags: [],
usedRepoTags: [],
});
};
updateColumnMarkdownData = (filePath) => {
let repoID = this.props.repoID;
// update state
@ -471,6 +463,7 @@ class LibContentView extends React.Component {
// load data
loadDirData = (path) => {
this.updateUsedRepoTags();
if (!(path.includes(PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES) || path.includes(PRIVATE_FILE_TYPE.TAGS_PROPERTIES))) {
this.showDir(path);
}
@ -2276,13 +2269,8 @@ class LibContentView extends React.Component {
this.setState({ isDirentSelected });
};
metadataStatusCallback = ({ enableMetadata, enableTags }) => {
metadataStatusCallback = ({ enableTags }) => {
this.props.eventBus.dispatch(EVENT_BUS_TYPE.TAG_STATUS, enableTags);
if (enableMetadata && enableTags) {
this.updateUsedRepoTags();
return;
}
this.clearRepoTags();
};
tagsChangedCallback = (tags) => {