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:
@@ -9,7 +9,7 @@ import ListRelatedFileDialog from './components/dialog/list-related-file-dialog'
|
||||
import AddRelatedFileDialog from './components/dialog/add-related-file-dialog';
|
||||
import ShareDialog from './components/dialog/share-dialog';
|
||||
|
||||
const { repoID, repoName, filePath, fileName, mode, draftID, draftFilePath, isDraft, hasDraft, shareLinkExpireDaysMin, shareLinkExpireDaysMax } = window.app.pageOptions;
|
||||
const { repoID, repoName, filePath, fileName, mode, draftID, draftFilePath, draftOriginFilePath, isDraft, hasDraft, shareLinkExpireDaysMin, shareLinkExpireDaysMax } = window.app.pageOptions;
|
||||
const { siteRoot, serviceUrl, seafileCollabServer } = window.app.config;
|
||||
const userInfo = window.app.userInfo;
|
||||
const userName = userInfo.username;
|
||||
@@ -219,7 +219,7 @@ class EditorUtilities {
|
||||
}
|
||||
|
||||
goDraftPage() {
|
||||
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + draftFilePath + '?mode=edit';
|
||||
window.location.href = serviceUrl + '/drafts/' + draftID + '/';
|
||||
}
|
||||
|
||||
createDraftFile() {
|
||||
@@ -228,6 +228,12 @@ class EditorUtilities {
|
||||
});
|
||||
}
|
||||
|
||||
publishDraftFile() {
|
||||
return seafileAPI.publishDraft(draftID).then(res => {
|
||||
window.location.href = serviceUrl + '/lib/' + repoID + '/file' + encodeURIComponent(draftOriginFilePath);
|
||||
});
|
||||
}
|
||||
|
||||
fileMetaData() {
|
||||
return seafileAPI.fileMetaData(repoID, filePath);
|
||||
}
|
||||
|
Reference in New Issue
Block a user