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:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user