1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 02:48:51 +00:00

Draft optimized (#2409)

* repair drafts

* repair naming error

* optimized code

* sentence error
This commit is contained in:
shanshuirenjia
2018-09-29 10:24:46 +08:00
committed by Daniel Pan
parent 3273900056
commit 5cffd4cb69
9 changed files with 37 additions and 30 deletions

View File

@@ -2,8 +2,8 @@ import React from 'react';
import { gettext } from '../../components/constants';
import editUtilties from '../../utils/editor-utilties';
import Loading from '../../components/loading';
import ListView from '../../components/list-view/list-view';
import ListMenu from '../../components/list-view/list-menu';
import DraftListView from '../../components/draft-list-view/draft-list-view';
import DraftListMenu from '../../components/draft-list-view/draft-list-menu';
class DraftsView extends React.Component {
@@ -87,7 +87,7 @@ class DraftsView extends React.Component {
<div className="cur-view-content" style={{padding: 0}}>
{this.state.isLoadingDraft && <Loading /> }
{(!this.state.isLoadingDraft && this.state.draftList.length !==0) &&
<ListView
<DraftListView
draftList={this.state.draftList}
isItemFreezed={this.state.isItemFreezed}
onMenuToggleClick={this.onMenuToggleClick}
@@ -95,11 +95,12 @@ class DraftsView extends React.Component {
}
{(!this.state.isLoadingDraft && this.state.draftList.length === 0) &&
<div className="message empty-tip">
<h2>{gettext('There is no draft file existing')}</h2>
<h2>{gettext('No draft yet')}</h2>
<p>{gettext('Draft is a way to let you collaborate with others on files. You can create a draft from a file, edit the draft and then ask for a review. The original file will be updated only after the draft be reviewed.')}</p>
</div>
}
{this.state.isMenuShow &&
<ListMenu
<DraftListMenu
isMenuShow={this.state.isMenuShow}
currentDraft={this.state.currentDraft}
menuPosition={this.state.menuPosition}