1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 09:21:54 +00:00
This commit is contained in:
Michael An
2019-03-15 17:37:04 +08:00
committed by Daniel Pan
parent d69b1a9c31
commit 5ba079db0b
2 changed files with 30 additions and 15 deletions

View File

@@ -939,7 +939,9 @@ class MarkdownEditor extends React.Component {
render() {
let component;
let sidePanel = (this.state.isShowHistory || this.state.isShowComments) ? true : false;
let sidePanel = this.state.isShowHistory ? true : false;
let markdownViewer = sidePanel ? "seafile-md-viewer-slate side-panel-on" :
(this.state.isShowComments ? "seafile-md-viewer-slate comment-on" : "seafile-md-viewer-slate");
if (this.state.loading) {
return (
<div className="empty-loading-page">
@@ -966,7 +968,7 @@ class MarkdownEditor extends React.Component {
toggleNewDraft={editorUtilities.createDraftFile}
commentsNumber={this.state.commentsNumber}
toggleCommentList={this.toggleCommentList}
showFileHistory={true}
showFileHistory={this.state.isShowHistory ? false : true }
toggleHistory={this.toggleHistory}
/>
<div className="seafile-md-viewer d-flex">
@@ -985,7 +987,7 @@ class MarkdownEditor extends React.Component {
</div>
</div>
:
<div className={sidePanel ? "seafile-md-viewer-slate side-panel-on" : "seafile-md-viewer-slate"}>
<div className={markdownViewer}>
<MarkdownViewerSlate
relatedFiles={this.state.relatedFiles}
siteRoot={siteRoot}
@@ -1003,9 +1005,9 @@ class MarkdownEditor extends React.Component {
scrollToNode={this.scrollToNode}
/>
}
{this.state.isShowComments && <CommentPanel toggleCommentPanel={this.toggleCommentList}/>}
</div>
<div className="seafile-md-viewer-side-panel">
{this.state.isShowComments && <CommentPanel toggleCommentPanel={this.toggleCommentList}/>}
{
this.state.isShowHistory &&
<HistoryList