This commit is contained in:
Vanessa 2022-07-01 22:12:43 +08:00
parent d1a2140cd9
commit 8c639f8a16
3 changed files with 6 additions and 7 deletions

View file

@ -54,9 +54,9 @@ export const newFile = (notebookId?: string, currentPath?: string, open?: boolea
}
fetchPost("/api/filetree/getDocNameTemplate", {notebook: notebookId}, (data) => {
const id = Lute.NewNodeID();
const newPath = pathPosix().join(getDisplayName(currentPath, false, true), id + ".sy")
const newPath = pathPosix().join(getDisplayName(currentPath, false, true), id + ".sy");
if (paths) {
paths[paths.indexOf(undefined)] = newPath
paths[paths.indexOf(undefined)] = newPath;
}
fetchPost("/api/filetree/createDoc", {
notebook: notebookId,