mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 23:48:47 +00:00
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
|
||||
import ModalPortal from './modal-portal';
|
||||
import ListTaggedFilesDialog from './dialog/list-taggedfiles-dialog';
|
||||
import ListRepoDraftsDialog from './dialog/list-repo-drafts-dialog';
|
||||
import ListRepoReviewsDialog from './dialog/list-repo-reviews-dialog';
|
||||
import ReadmeDialog from './dialog/readme-dialog';
|
||||
import { siteRoot, gettext } from '../utils/constants';
|
||||
import { Utils } from '../utils/utils';
|
||||
@@ -16,7 +15,6 @@ const propTypes = {
|
||||
usedRepoTags: PropTypes.array.isRequired,
|
||||
readmeMarkdown: PropTypes.object,
|
||||
draftCounts: PropTypes.number,
|
||||
reviewCounts: PropTypes.number,
|
||||
updateUsedRepoTags: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
@@ -28,7 +26,6 @@ class RepoInfoBar extends React.Component {
|
||||
currentTag: null,
|
||||
isListTaggedFileShow: false,
|
||||
showRepoDrafts: false,
|
||||
showRepoReviews: false,
|
||||
showReadmeDialog: false,
|
||||
};
|
||||
}
|
||||
@@ -52,12 +49,6 @@ class RepoInfoBar extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
toggleReviews = () => {
|
||||
this.setState({
|
||||
showRepoReviews: !this.state.showRepoReviews
|
||||
});
|
||||
}
|
||||
|
||||
toggleReadme = () => {
|
||||
this.setState({
|
||||
showReadmeDialog: !this.state.showReadmeDialog
|
||||
@@ -107,15 +98,6 @@ class RepoInfoBar extends React.Component {
|
||||
</span>
|
||||
</span>
|
||||
}
|
||||
{this.props.reviewCounts > 0 &&
|
||||
<span className="file-info">
|
||||
<span className="info-icon sf2-icon-review"></span>
|
||||
<span className="used-tag-name">{gettext('review')}</span>
|
||||
<span className="used-tag-files" onClick={this.toggleReviews}>
|
||||
{this.props.reviewCounts > 1 ? this.props.reviewCounts + ' files' : this.props.reviewCounts + ' file'}
|
||||
</span>
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
{this.state.isListTaggedFileShow && (
|
||||
<ModalPortal>
|
||||
@@ -138,15 +120,6 @@ class RepoInfoBar extends React.Component {
|
||||
</ModalPortal>
|
||||
)}
|
||||
|
||||
{this.state.showRepoReviews && (
|
||||
<ModalPortal>
|
||||
<ListRepoReviewsDialog
|
||||
toggle={this.toggleReviews}
|
||||
repoID={this.props.repoID}
|
||||
/>
|
||||
</ModalPortal>
|
||||
)}
|
||||
|
||||
{this.state.showReadmeDialog && (
|
||||
<ModalPortal>
|
||||
<ReadmeDialog
|
||||
|
Reference in New Issue
Block a user