mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
This commit is contained in:
parent
e01b7256b5
commit
2fc5fcb651
4 changed files with 9 additions and 9 deletions
|
|
@ -315,7 +315,7 @@ export class Files extends Model {
|
||||||
notebookId,
|
notebookId,
|
||||||
currentPath: pathString,
|
currentPath: pathString,
|
||||||
useSavePath: false,
|
useSavePath: false,
|
||||||
pushCreateEvt: true,
|
listDocTree: true,
|
||||||
});
|
});
|
||||||
} else if (type === "more-root") {
|
} else if (type === "more-root") {
|
||||||
initNavigationMenu(options.app, target.parentElement).popup({
|
initNavigationMenu(options.app, target.parentElement).popup({
|
||||||
|
|
|
||||||
|
|
@ -459,7 +459,7 @@ export const initFileMenu = (app: App, notebookId: string, pathString: string, l
|
||||||
currentPath: pathPosix().dirname(pathString),
|
currentPath: pathPosix().dirname(pathString),
|
||||||
paths,
|
paths,
|
||||||
useSavePath: false,
|
useSavePath: false,
|
||||||
pushCreateEvt: true,
|
listDocTree: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
|
@ -483,7 +483,7 @@ export const initFileMenu = (app: App, notebookId: string, pathString: string, l
|
||||||
currentPath: pathPosix().dirname(pathString),
|
currentPath: pathPosix().dirname(pathString),
|
||||||
paths,
|
paths,
|
||||||
useSavePath: false,
|
useSavePath: false,
|
||||||
pushCreateEvt: true,
|
listDocTree: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ export class MobileFiles extends Model {
|
||||||
notebookId,
|
notebookId,
|
||||||
currentPath: pathString,
|
currentPath: pathString,
|
||||||
useSavePath: false,
|
useSavePath: false,
|
||||||
pushCreateEvt: true,
|
listDocTree: true,
|
||||||
});
|
});
|
||||||
} else if (type === "more-root") {
|
} else if (type === "more-root") {
|
||||||
initNavigationMenu(app, target.parentElement);
|
initNavigationMenu(app, target.parentElement);
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ export const newFile = (optios: {
|
||||||
useSavePath: boolean,
|
useSavePath: boolean,
|
||||||
name?: string,
|
name?: string,
|
||||||
afterCB?: (id: string, title: string) => void
|
afterCB?: (id: string, title: string) => void
|
||||||
pushCreateEvt?: boolean
|
listDocTree?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
if (getOpenNotebookCount() === 0) {
|
if (getOpenNotebookCount() === 0) {
|
||||||
showMessage(window.siyuan.languages.newFileTip);
|
showMessage(window.siyuan.languages.newFileTip);
|
||||||
|
|
@ -104,7 +104,7 @@ export const newFile = (optios: {
|
||||||
path: createPath,
|
path: createPath,
|
||||||
// 根目录时无法确定 parentID
|
// 根目录时无法确定 parentID
|
||||||
markdown: "",
|
markdown: "",
|
||||||
pushCreateEvt: optios.pushCreateEvt
|
listDocTree: optios.listDocTree
|
||||||
}, response => {
|
}, response => {
|
||||||
if (optios.afterCB) {
|
if (optios.afterCB) {
|
||||||
optios.afterCB(response.data, pathPosix().basename(createPath));
|
optios.afterCB(response.data, pathPosix().basename(createPath));
|
||||||
|
|
@ -130,7 +130,7 @@ export const newFile = (optios: {
|
||||||
path: createPath,
|
path: createPath,
|
||||||
parentID: getDisplayName(optios.currentPath, true, true),
|
parentID: getDisplayName(optios.currentPath, true, true),
|
||||||
markdown: "",
|
markdown: "",
|
||||||
pushCreateEvt: optios.pushCreateEvt
|
listDocTree: optios.listDocTree
|
||||||
}, response => {
|
}, response => {
|
||||||
if (optios.afterCB) {
|
if (optios.afterCB) {
|
||||||
optios.afterCB(response.data, pathPosix().basename(createPath));
|
optios.afterCB(response.data, pathPosix().basename(createPath));
|
||||||
|
|
@ -158,7 +158,7 @@ export const newFile = (optios: {
|
||||||
notebook: data.data.box,
|
notebook: data.data.box,
|
||||||
path: createPath,
|
path: createPath,
|
||||||
markdown: "",
|
markdown: "",
|
||||||
pushCreateEvt: optios.pushCreateEvt
|
listDocTree: optios.listDocTree
|
||||||
}, response => {
|
}, response => {
|
||||||
if (optios.afterCB) {
|
if (optios.afterCB) {
|
||||||
optios.afterCB(response.data, pathPosix().basename(createPath));
|
optios.afterCB(response.data, pathPosix().basename(createPath));
|
||||||
|
|
@ -187,7 +187,7 @@ export const newFile = (optios: {
|
||||||
title,
|
title,
|
||||||
md: "",
|
md: "",
|
||||||
sorts: optios.paths,
|
sorts: optios.paths,
|
||||||
pushCreateEvt: optios.pushCreateEvt
|
listDocTree: optios.listDocTree
|
||||||
}, () => {
|
}, () => {
|
||||||
if (optios.afterCB) {
|
if (optios.afterCB) {
|
||||||
optios.afterCB(id, title);
|
optios.afterCB(id, title);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue