mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-13 05:39:59 +00:00
Show draft review info at repo info bar (#2832)
This commit is contained in:
@@ -63,6 +63,8 @@ const propTypes = {
|
||||
reviewID: PropTypes.any,
|
||||
usedRepoTags: PropTypes.array.isRequired,
|
||||
readmeMarkdown: PropTypes.object,
|
||||
draftCounts: PropTypes.number,
|
||||
reviewCounts: PropTypes.number,
|
||||
};
|
||||
|
||||
class MainPanel extends Component {
|
||||
@@ -160,6 +162,9 @@ class MainPanel extends Component {
|
||||
render() {
|
||||
|
||||
const ErrMessage = (<div className="message empty-tip err-message"><h2>{gettext('Folder does not exist.')}</h2></div>);
|
||||
const showRepoInfoBar = this.props.path === '/' && (
|
||||
this.props.usedRepoTags.length != 0 || this.props.readmeMarkdown != null ||
|
||||
this.props.draftCounts != 0 || this.props.reviewCounts != 0);
|
||||
|
||||
return (
|
||||
<div className="main-panel wiki-main-panel o-hidden">
|
||||
@@ -240,12 +245,14 @@ class MainPanel extends Component {
|
||||
</Fragment>
|
||||
</WikiMarkdownViewer> :
|
||||
<Fragment>
|
||||
{this.props.path === '/' && !(this.props.usedRepoTags.length === 0 && this.props.readmeMarkdown === null) && (
|
||||
{showRepoInfoBar && (
|
||||
<RepoInfoBar
|
||||
repoID={repoID}
|
||||
currentPath={this.props.path}
|
||||
usedRepoTags={this.props.usedRepoTags}
|
||||
readmeMarkdown={this.props.readmeMarkdown}
|
||||
draftCounts={this.props.draftCounts}
|
||||
reviewCounts={this.props.reviewCounts}
|
||||
/>
|
||||
)}
|
||||
<DirentListView
|
||||
|
Reference in New Issue
Block a user