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

update draft (#2491)

This commit is contained in:
C_Q
2018-11-01 17:52:59 +08:00
committed by Daniel Pan
parent 41bc505562
commit 4cc735cf1f
11 changed files with 104 additions and 19 deletions

View File

@@ -13,6 +13,8 @@ let mode = window.app.pageOptions.mode;
let draftID = window.app.pageOptions.draftID;
let reviewID = window.app.pageOptions.reviewID;
let isDraft = window.app.pageOptions.isDraft;
let hasDraft = window.app.pageOptions.hasDraft;
let draftFilePath = window.app.pageOptions.draftFilePath;
let userName = window.app.userInfo.username;
let dirPath = '/';
@@ -210,6 +212,10 @@ class EditorUtilities {
getUserAvatar(size) {
return seafileAPI.getUserAvatar(userName, size);
}
goDraftPage() {
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + draftFilePath + '?mode=edit'
}
}
@@ -286,6 +292,7 @@ class MarkdownEditor extends React.Component {
draftID={draftID}
reviewID={reviewID}
isDraft={isDraft}
hasDraft={hasDraft}
/>
);
}