1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-14 14:21:23 +00:00

feat: start revise style (#5540)

* feat: start revise style

* restore code

* restore code
This commit is contained in:
杨国璇
2023-07-09 16:27:02 +08:00
committed by GitHub
parent 7b7d4ca53a
commit 5165998326
9 changed files with 16 additions and 41 deletions

View File

@@ -156,9 +156,6 @@ class DirentGridView extends React.Component{
case 'Unmask as draft':
this.onUnmaskAsDraft(currentObject);
break;
case 'Start revise':
this.onStartRevise(currentObject);
break;
case 'List revisions':
this.openRevisionsPage(currentObject);
break;
@@ -296,18 +293,6 @@ class DirentGridView extends React.Component{
});
}
onStartRevise = (currentObject) => {
let repoID = this.props.repoID;
let filePath = this.getDirentPath(currentObject);
seafileAPI.sdocStartRevise(repoID, filePath).then((res) => {
const url = siteRoot + 'lib/' + repoID + '/file' + Utils.encodePath(res.data.file_path);
window.open(url);
}).catch(error => {
const errMessage = Utils.getErrorMsg(error);
toaster.danger(errMessage);
});
}
openRevisionsPage = (currentObject) => {
const repoID = this.props.repoID;
const filePath = this.getDirentPath(currentObject);