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

import and export sdoc (#6508)

* import and export sdoc

* rebase and optimize

* update

* optimize code

* update iconfont

* update seafile-js version

* update

---------

Co-authored-by: 杨顺强 <978987373@qq.com>
This commit is contained in:
JoinTyang
2024-09-09 15:58:33 +08:00
committed by GitHub
parent ba1d59be21
commit a0ca3b2f79
22 changed files with 443 additions and 28 deletions

View File

@@ -237,6 +237,14 @@ class DirentListItem extends React.Component {
window.location.href = exportToDocxUrl;
};
exportSdoc = () => {
const serviceUrl = window.app.config.serviceURL;
let repoID = this.props.repoID;
let filePath = this.getDirentPath(this.props.dirent);
let exportToSdocUrl = serviceUrl + '/lib/' + repoID + '/file/' + filePath + '?dl=1';
window.location.href = exportToSdocUrl;
};
closeSharedDialog = () => {
this.setState({ isShareDialogShow: !this.state.isShareDialogShow });
};
@@ -293,6 +301,9 @@ class DirentListItem extends React.Component {
case 'Export docx':
this.exportDocx();
break;
case 'Export sdoc':
this.exportSdoc();
break;
case 'Convert to sdoc':
this.onItemConvert(event, 'sdoc');
break;