mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 15:26:19 +00:00
Feature/show tags in search dialog (#7727)
* show related tags * optimize * fix eslint warning * change searched tags background --------- Co-authored-by: zhouwenxuan <aries@Mac.local> Co-authored-by: Michael An <1822852997@qq.com>
This commit is contained in:
@@ -160,6 +160,7 @@ class LibContentView extends React.Component {
|
||||
this.unsubscribeEvent = this.props.eventBus.subscribe(EVENT_BUS_TYPE.SEARCH_LIBRARY_CONTENT, this.onSearchedClick);
|
||||
this.unsubscribeOpenTreePanel = eventBus.subscribe(EVENT_BUS_TYPE.OPEN_TREE_PANEL, this.openTreePanel);
|
||||
this.calculatePara(this.props);
|
||||
this.unsubscribeSelectSearchedTag = this.props.eventBus.subscribe(EVENT_BUS_TYPE.SELECT_TAG, this.onTreeNodeClick);
|
||||
}
|
||||
|
||||
onMessageCallback = (noticeData) => {
|
||||
@@ -324,6 +325,7 @@ class LibContentView extends React.Component {
|
||||
this.unsubscribeEvent();
|
||||
this.unsubscribeOpenTreePanel();
|
||||
this.unsubscribeEventBus && this.unsubscribeEventBus();
|
||||
this.unsubscribeSelectSearchedTag && this.unsubscribeSelectSearchedTag();
|
||||
this.props.eventBus.dispatch(EVENT_BUS_TYPE.CURRENT_LIBRARY_CHANGED, {
|
||||
repoID: '',
|
||||
repoName: '',
|
||||
@@ -2263,6 +2265,7 @@ class LibContentView extends React.Component {
|
||||
};
|
||||
|
||||
metadataStatusCallback = ({ enableMetadata, enableTags }) => {
|
||||
this.props.eventBus.dispatch(EVENT_BUS_TYPE.TAG_STATUS, enableTags);
|
||||
if (enableMetadata && enableTags) {
|
||||
this.updateUsedRepoTags();
|
||||
return;
|
||||
@@ -2270,6 +2273,10 @@ class LibContentView extends React.Component {
|
||||
this.clearRepoTags();
|
||||
};
|
||||
|
||||
tagsChangedCallback = (tags) => {
|
||||
this.props.eventBus.dispatch(EVENT_BUS_TYPE.TAGS_CHANGED, tags);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { repoID } = this.props;
|
||||
let { currentRepoInfo, userPerm, isCopyMoveProgressDialogShow, isDeleteFolderDialogOpen, errorMsg,
|
||||
@@ -2346,7 +2353,7 @@ class LibContentView extends React.Component {
|
||||
const detailDirent = currentDirent || currentNode?.object || null;
|
||||
return (
|
||||
<MetadataStatusProvider repoID={repoID} repoInfo={currentRepoInfo} hideMetadataView={this.hideMetadataView} statusCallback={this.metadataStatusCallback} >
|
||||
<TagsProvider repoID={repoID} currentPath={path} repoInfo={currentRepoInfo} selectTagsView={this.onTreeNodeClick} >
|
||||
<TagsProvider repoID={repoID} currentPath={path} repoInfo={currentRepoInfo} selectTagsView={this.onTreeNodeClick} tagsChangedCallback={this.tagsChangedCallback} >
|
||||
<MetadataProvider repoID={repoID} currentPath={path} repoInfo={currentRepoInfo} selectMetadataView={this.onTreeNodeClick} >
|
||||
<CollaboratorsProvider repoID={repoID}>
|
||||
<div className="main-panel-center flex-row">
|
||||
|
Reference in New Issue
Block a user