mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
fix metadata search file (#6901)
This commit is contained in:
@@ -12,6 +12,7 @@ import { Utils } from '../../utils/utils';
|
|||||||
import toaster from '../toast';
|
import toaster from '../toast';
|
||||||
import Loading from '../loading';
|
import Loading from '../loading';
|
||||||
import { SEARCH_MASK, SEARCH_CONTAINER } from '../../constants/zIndexes';
|
import { SEARCH_MASK, SEARCH_CONTAINER } from '../../constants/zIndexes';
|
||||||
|
import { PRIVATE_FILE_TYPE } from '../../constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
repoID: PropTypes.string,
|
repoID: PropTypes.string,
|
||||||
@@ -604,7 +605,9 @@ class Search extends Component {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (this.props.repoID) {
|
if (this.props.repoID) {
|
||||||
if (this.props.path && this.props.path !== '/' && !this.props.isViewFile) {
|
const { path } = this.props;
|
||||||
|
const isMetadataView = path && path.startsWith('/' + PRIVATE_FILE_TYPE.FILE_EXTENDED_PROPERTIES);
|
||||||
|
if (path && path !== '/' && !this.props.isViewFile && !isMetadataView) {
|
||||||
return (
|
return (
|
||||||
<div className="search-types">
|
<div className="search-types">
|
||||||
<div className={`search-types-repo ${highlightIndex === 0 ? 'search-types-highlight' : ''}`} onClick={this.searchRepo} tabIndex={0}>
|
<div className={`search-types-repo ${highlightIndex === 0 ? 'search-types-highlight' : ''}`} onClick={this.searchRepo} tabIndex={0}>
|
||||||
|
Reference in New Issue
Block a user