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:
@@ -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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -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,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user