mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-25 10:11:24 +00:00
* update move dialog and search input * update move dialog ui * clean up code * update code --------- Co-authored-by: renjie-run <rj.aiyayao@gmail.com>
27 lines
788 B
JavaScript
27 lines
788 B
JavaScript
import React from 'react';
|
|
|
|
const RecentlyUsedListItem = ({ item, isSelected, onItemClick }) => {
|
|
const title = item.path === '/' ? item.path : item.path.split('/').pop();
|
|
|
|
const handleItemClick = () => {
|
|
onItemClick(item.repo, item.path);
|
|
};
|
|
|
|
return (
|
|
<li>
|
|
<div className={`${isSelected ? 'item-active' : ''} item-info recently-used`} onClick={handleItemClick}>
|
|
<div className="item-left-icon">
|
|
<i className="tree-node-icon">
|
|
<span className="icon sf3-font sf3-font-folder tree-node-icon"></span>
|
|
</i>
|
|
</div>
|
|
<div className="item-text">
|
|
<span className="name user-select-none ellipsis" title={title}>{title}</span>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
);
|
|
};
|
|
|
|
export default RecentlyUsedListItem;
|