1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-15 06:44:16 +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

@@ -270,9 +270,6 @@ class DirentListItem extends React.Component {
case 'Unmask as draft':
this.onUnmaskAsDraft();
break;
case 'Start revise':
this.onStartRevise();
break;
case 'List revisions':
this.openRevisionsPage();
break;
@@ -387,18 +384,6 @@ class DirentListItem extends React.Component {
});
}
onStartRevise = () => {
const repoID = this.props.repoID;
const filePath = this.getDirentPath(this.props.dirent);
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 = () => {
const repoID = this.props.repoID;
const filePath = this.getDirentPath(this.props.dirent);