1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 21:30:39 +00:00

Markdown viewer improve (#2830)

This commit is contained in:
杨顺强
2019-01-15 19:58:25 +08:00
committed by Daniel Pan
parent 26c4565426
commit 9a53cccd2f
5 changed files with 160 additions and 161 deletions

View File

@@ -2,7 +2,7 @@ import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import { gettext, repoID, slug, siteRoot } from '../../utils/constants';
import CommonToolbar from '../../components/toolbar/common-toolbar';
import MarkdownViewer from '../../components/markdown-viewer';
import WikiMarkdownViewer from '../../components/wiki-markdown-viewer';
import TreeDirView from '../../components/tree-dir-view/tree-dir-view';
let loginUser = window.app.pageOptions.username;
@@ -47,9 +47,6 @@ class MainPanel extends Component {
this.props.onMainNavBarClick(e.target.dataset.path);
}
onContentRendered = (markdownViewer) => {
//
}
render() {
@@ -113,17 +110,16 @@ class MainPanel extends Component {
</div>
</div>
<div className="cur-view-content">
{ this.props.isViewFileState &&
<MarkdownViewer
{this.props.isViewFileState &&
<WikiMarkdownViewer
markdownContent={this.props.content}
latestContributor={this.props.latestContributor}
lastModified = {this.props.lastModified}
onLinkClick={this.props.onLinkClick}
isFileLoading={this.props.isFileLoading}
onContentRendered={this.onContentRendered}
lastModified = {this.props.lastModified}
latestContributor={this.props.latestContributor}
onLinkClick={this.props.onLinkClick}
/>
}
{ !this.props.isViewFileState &&
{!this.props.isViewFileState &&
<TreeDirView node={this.props.changedNode} onMainNodeClick={this.props.onMainNodeClick} />
}
</div>