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

update draft (#2491)

This commit is contained in:
C_Q
2018-11-01 17:52:59 +08:00
committed by Daniel Pan
parent 41bc505562
commit 4cc735cf1f
11 changed files with 104 additions and 19 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Link } from '@reach/router';
import { gettext, siteRoot } from '../utils/constants';
import { seafileAPI } from '../utils/seafile-api';
import { Badge } from 'reactstrap';
const propTypes = {
currentTab: PropTypes.string.isRequired,
@@ -172,7 +173,7 @@ class MainSideNav extends React.Component {
<li className={`tab ${this.state.currentTab === 'drafts' ? 'tab-cur' : ''}`} onClick={() => this.tabItemClick('drafts')}>
<Link to={siteRoot + 'drafts/'} title={gettext('Drafts')}>
<span className="sf2-icon-edit" aria-hidden="true"></span>
{gettext('Drafts')}
{gettext('Drafts')} {this.props.draftCounts === 0 ? '' : <Badge color="info" pill>{this.props.draftCounts}</Badge>}
</Link>
</li>
<li className="tab" id="share-admin-nav">

View File

@@ -19,7 +19,7 @@ class SidePanel extends React.Component {
<Logo onCloseSidePanel={this.props.onCloseSidePanel}/>
</div>
<div className="side-panel-center">
<MainSideNav currentTab={this.props.currentTab}/>
<MainSideNav currentTab={this.props.currentTab} draftCounts={this.props.draftCounts}/>
</div>
<div className="side-panel-footer">
<SideNavFooter />