mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 09:51:26 +00:00
search library by repo_name (#3212)
* search library by repo_name * modify icon
This commit is contained in:
@@ -31,7 +31,8 @@ class SearchedListItem extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { item, currentItem } = this.props;
|
let { item, currentItem } = this.props;
|
||||||
let fileIconUrl = item.is_dir ? Utils.getFolderIconUrl(false, 192) : Utils.getFileIconUrl(item.name, 192);
|
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(false);
|
||||||
|
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);
|
||||||
let trClass = this.state.highlight ? 'tr-highlight' : '';
|
let trClass = this.state.highlight ? 'tr-highlight' : '';
|
||||||
if (currentItem) {
|
if (currentItem) {
|
||||||
if (item.repo_id === currentItem.repo_id && item.path === currentItem.path) {
|
if (item.repo_id === currentItem.repo_id && item.path === currentItem.path) {
|
||||||
|
@@ -16,7 +16,8 @@ class SearchResultItem extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
let item = this.props.item;
|
let item = this.props.item;
|
||||||
let fileIconUrl = item.is_dir ? Utils.getFolderIconUrl(false, 192) : Utils.getFileIconUrl(item.name, 192);
|
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(false);
|
||||||
|
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);
|
||||||
return (
|
return (
|
||||||
<li className="search-result-item" onClick={this.onClickHandler}>
|
<li className="search-result-item" onClick={this.onClickHandler}>
|
||||||
<img className="item-img" src={fileIconUrl} alt="" />
|
<img className="item-img" src={fileIconUrl} alt="" />
|
||||||
|
Reference in New Issue
Block a user