mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 17:02:47 +00:00
highlight selection
This commit is contained in:
@@ -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
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user