1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 17:02:47 +00:00

highlight selection

This commit is contained in:
Michael An
2019-06-03 11:05:41 +08:00
parent 04c8b7aef0
commit e30bd92332
2 changed files with 7 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ class SysAdmin extends React.Component {
return (
<div id="main">
<SidePanel isSidePanelClosed={isSidePanelClosed} onCloseSidePanel={this.onCloseSidePanel} />
<SidePanel isSidePanelClosed={isSidePanelClosed} onCloseSidePanel={this.onCloseSidePanel} currentTab={currentTab}/>
<MainPanel>
<Router className="reach-router">
<FileScanRecords

View File

@@ -10,10 +10,15 @@ import { gettext, siteRoot, isPro, isDefaultAdmin, canViewSystemInfo, canViewSta
const propTypes = {
isSidePanelClosed: PropTypes.bool.isRequired,
onCloseSidePanel: PropTypes.func.isRequired,
currentTab: PropTypes.string.isRequired,
};
class SidePanel extends React.Component {
getActiveClass = (tab) => {
return this.props.currentTab == tab ? 'active' : '';
}
render() {
return (
<div className={`side-panel ${this.props.isSidePanelClosed ? '' : 'left-zero'}`}>
@@ -171,7 +176,7 @@ class SidePanel extends React.Component {
}
{isDefaultAdmin && enableWorkWeixinDepartments &&
<li className="nav-item">
<Link className='nav-link ellipsis' to={siteRoot + 'sys/work-weixin/departments/'}>
<Link className={`nav-link ellipsis ${this.getActiveClass('departments')}`} to={siteRoot + 'sys/work-weixin/departments/'}>
<span className="sf2-icon-msgs" aria-hidden="true"></span>
<span className="nav-text">{'企业微信集成'}</span>
</Link>