1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

repair icon style (#3255)

This commit is contained in:
王健辉
2019-04-12 14:27:19 +08:00
committed by Daniel Pan
parent e7ebfcf66c
commit e760a25cf4
2 changed files with 8 additions and 2 deletions

View File

@@ -16,11 +16,12 @@ class SearchResultItem extends React.Component {
render() {
let item = this.props.item;
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(false);
let className = item.link_content ? "item-img" : "lib-item-img";
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(true);
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);
return (
<li className="search-result-item" onClick={this.onClickHandler}>
<img className="item-img" src={fileIconUrl} alt="" />
<img className={className} src={fileIconUrl} alt="" />
<div className="item-content">
<div className="item-name ellipsis">{item.name}</div>
<div className="item-link ellipsis">{item.repo_name}/{item.link_content}</div>