1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 03:47:09 +00:00

Lib view mode improve (#2968)

* optimized column style

* update heading icon font-size

* improve code style
This commit is contained in:
杨顺强
2019-02-20 14:43:55 +08:00
committed by Daniel Pan
parent 3d16236bb9
commit 7c81bc6e6c
5 changed files with 90 additions and 7 deletions

View File

@@ -12,7 +12,8 @@ const propTypes = {
latestContributor: PropTypes.string.isRequired,
lastModified: PropTypes.string.isRequired,
onLinkClick: PropTypes.func.isRequired,
isWiki: PropTypes.bool
isWiki: PropTypes.bool,
isTOCShow: PropTypes.bool,
};
const contentClass = 'wiki-page-content';
@@ -152,10 +153,14 @@ class WikiMarkdownViewer extends React.Component {
}
renderMarkdown = () => {
let isTOCShow = true;
if (this.props.isTOCShow === false) {
isTOCShow = false;
}
if (this.props.isWiki) {
return (
<MarkdownViewer
showTOC={true}
showTOC={isTOCShow}
markdownContent={this.props.markdownContent}
activeTitleIndex={this.state.activeTitleIndex}
onContentRendered={this.onContentRendered}
@@ -166,7 +171,7 @@ class WikiMarkdownViewer extends React.Component {
return (
<MarkdownViewer
showTOC={true}
showTOC={isTOCShow}
markdownContent={this.props.markdownContent}
activeTitleIndex={this.state.activeTitleIndex}
onContentRendered={this.onContentRendered}