1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

display readme.md (#2772)

This commit is contained in:
王健辉
2019-01-09 12:10:33 +08:00
committed by Daniel Pan
parent ea37b0d83f
commit ca117bd2f0
9 changed files with 209 additions and 126 deletions

View File

@@ -14,7 +14,7 @@ import MarkdownContentViewer from '../../components/markdown-viewer';
import DirentListView from '../../components/dirent-list-view/dirent-list-view';
import DirentDetail from '../../components/dirent-detail/dirent-details';
import FileUploader from '../../components/file-uploader/file-uploader';
import FileTagsViewer from '../../components/filetags-viewer';
import RepoInfoBar from '../../components/repo-info-bar';
const propTypes = {
content: PropTypes.string,
@@ -61,6 +61,7 @@ const propTypes = {
goDraftPage: PropTypes.func,
reviewID: PropTypes.any,
usedRepoTags: PropTypes.array.isRequired,
readmeMarkdown: PropTypes.object,
};
class MainPanel extends Component {
@@ -256,14 +257,13 @@ class MainPanel extends Component {
goReviewPage={this.props.goReviewPage}
/> :
<Fragment>
{(this.props.usedRepoTags.length > 0 && this.props.path === '/') && (
<div className="tags-summary-bar">
<FileTagsViewer
repoID={repoID}
currentPath={this.props.path}
usedRepoTags={this.props.usedRepoTags}
/>
</div>
{this.props.path === '/' && !(this.props.usedRepoTags.length === 0 && this.props.readmeMarkdown === null) && (
<RepoInfoBar
repoID={repoID}
currentPath={this.props.path}
usedRepoTags={this.props.usedRepoTags}
readmeMarkdown={this.props.readmeMarkdown}
/>
)}
<DirentListView
path={this.props.path}