mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
add title in published repo folder item (#4020)
This commit is contained in:
@@ -249,12 +249,12 @@ class FolderItem extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLink = (node) => {
|
renderLink = ({ href, name, path }) => {
|
||||||
const className = node.path === this.props.currentPath ? 'wiki-nav-content wiki-nav-content-highlight' : 'wiki-nav-content';
|
const className = `wiki-nav-content ${path === this.props.currentPath ? 'wiki-nav-content-highlight' : ''}`;
|
||||||
if (node.href && node.name) {
|
if (href && name) {
|
||||||
return <div className={className}><a href={node.href} data-path={node.path} onClick={this.toggleExpanded}>{node.name}</a></div>;
|
return <div className={className}><a href={href} data-path={path} onClick={this.toggleExpanded} title={name}>{name}</a></div>;
|
||||||
} else if (node.name) {
|
} else if (name) {
|
||||||
return <div className="wiki-nav-content"><span onClick={this.toggleExpanded}>{node.name}</span></div>;
|
return <div className="wiki-nav-content"><span onClick={this.toggleExpanded} title={name}>{name}</span></div>;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user