1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +00:00

update draft ui (#3049)

This commit is contained in:
陈钦亮
2019-03-05 15:37:51 +08:00
committed by Daniel Pan
parent ba58dc8205
commit 7e587c8b93
13 changed files with 32 additions and 33 deletions

View File

@@ -59,7 +59,7 @@ class Wiki extends Component {
libNeedDecrypt: false,
isDraft: false,
hasDraft: false,
draftFilePath: '',
draftID: '',
dirID: '',
usedRepoTags: [],
readmeMarkdown: null,
@@ -205,7 +205,7 @@ class Wiki extends Component {
this.setState({isFileLoading: true});
seafileAPI.getFileInfo(repoID, filePath).then((res) => {
let { mtime, permission, last_modifier_name, is_draft, has_draft, draft_file_path } = res.data;
let { mtime, permission, last_modifier_name, is_draft, has_draft, draft_id } = res.data;
seafileAPI.getFileDownloadLink(repoID, filePath).then((res) => {
seafileAPI.getFileContent(res.data).then((res) => {
this.setState({
@@ -216,7 +216,7 @@ class Wiki extends Component {
isFileLoading: false,
isDraft: is_draft,
hasDraft: has_draft,
draftFilePath: draft_file_path
draftID: draft_id
});
});
});
@@ -996,7 +996,7 @@ class Wiki extends Component {
}
goDraftPage = () => {
window.location.href = siteRoot + 'lib/' + repoID + '/file' + this.state.draftFilePath + '?mode=edit';
window.location.href = siteRoot + 'drafts/' + this.state.draftID + '/';
}
sortItems = (sortBy, sortOrder) => {