1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

Merge branch '7.0'

This commit is contained in:
plt
2019-09-27 21:04:20 +08:00
11 changed files with 109 additions and 36 deletions

View File

@@ -8,7 +8,7 @@ import { Utils } from '../utils/utils';
import toaster from './toast';
import Group from '../models/group';
import { canViewOrg, isDocs, isPro } from '../utils/constants';
import { canViewOrg, isDocs, isPro, customNavItems } from '../utils/constants';
const propTypes = {
currentTab: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
@@ -164,6 +164,21 @@ class MainSideNav extends React.Component {
);
}
renderCustomNavItems() {
return (
customNavItems.map((item, idx) => {
return (
<li key={idx} className="nav-item">
<a href={item.link} className="nav-link ellipsis" title={item.desc}>
<span className={item.icon} aria-hidden="true"></span>
<span className="nav-text">{item.desc}</span>
</a>
</li>
);
})
);
}
render() {
let showActivity = isDocs || isPro;
return (
@@ -261,6 +276,7 @@ class MainSideNav extends React.Component {
</a>
{this.renderSharedAdmin()}
</li>
{customNavItems && this.renderCustomNavItems()}
</ul>
</div>