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

style: format code

This commit is contained in:
liuhongbo
2024-05-21 15:39:58 +08:00
parent 6b419f4f10
commit c4bb455170
2 changed files with 4 additions and 4 deletions

View File

@@ -115,11 +115,11 @@ class SidePanel extends Component {
} }
}; };
onAddNewPage = async ({ name, icon, path, docUuid,successCallback, errorCallback }) => { onAddNewPage = async ({ name, icon, path, docUuid, successCallback, errorCallback }) => {
const { config } = this.props; const { config } = this.props;
const navigation = config.navigation; const navigation = config.navigation;
const pageId = generateUniqueId(navigation); const pageId = generateUniqueId(navigation);
const newPage = new Page({ id: pageId, name, icon, path,docUuid }); const newPage = new Page({ id: pageId, name, icon, path, docUuid });
this.addPage(newPage, successCallback, errorCallback); this.addPage(newPage, successCallback, errorCallback);
}; };

View File

@@ -95,12 +95,12 @@ class AddNewPageDialog extends React.Component {
createFile = (pageName, filePath) => { createFile = (pageName, filePath) => {
seafileAPI.createFile(repoID, filePath).then(res => { seafileAPI.createFile(repoID, filePath).then(res => {
const { obj_name, parent_dir,doc_uuid } = res.data; const { obj_name, parent_dir, doc_uuid } = res.data;
this.props.onAddNewPage({ this.props.onAddNewPage({
name: pageName, name: pageName,
icon: '', icon: '',
path: parent_dir === '/' ? `/${obj_name}` : `${parent_dir}/${obj_name}`, path: parent_dir === '/' ? `/${obj_name}` : `${parent_dir}/${obj_name}`,
docUuid:doc_uuid, docUuid: doc_uuid,
successCallback: this.onSuccess, successCallback: this.onSuccess,
errorCallback: this.onError, errorCallback: this.onError,
}); });