mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-19 23:06:09 +01:00
🚨
This commit is contained in:
parent
bc3ab68a9d
commit
be3ac44ce7
12 changed files with 80 additions and 85 deletions
|
|
@ -60,22 +60,22 @@ export const pathPosix = () => {
|
|||
};
|
||||
|
||||
export const getTopPaths = (liElements:Element[]) => {
|
||||
const fromPaths:string[] = []
|
||||
const fromPaths:string[] = [];
|
||||
liElements.forEach((item: HTMLElement) => {
|
||||
if (item.getAttribute("data-type") !== "navigation-root") {
|
||||
const dataPath = item.getAttribute("data-path")
|
||||
const dataPath = item.getAttribute("data-path");
|
||||
const isChild = fromPaths.find(item => {
|
||||
if (dataPath.startsWith(item.replace(".sy", ""))) {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
if (!isChild) {
|
||||
fromPaths.push(dataPath)
|
||||
fromPaths.push(dataPath);
|
||||
}
|
||||
}
|
||||
});
|
||||
return fromPaths
|
||||
}
|
||||
return fromPaths;
|
||||
};
|
||||
|
||||
const moveToPath = (fromPaths: string[], toNotebook: string, toPath: string, dialog: Dialog) => {
|
||||
fetchPost("/api/filetree/moveDocs", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue