1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +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
2 changed files with 4 additions and 16 deletions

View File

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

View File

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