Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-05-02 23:38:57 +08:00
commit 4201f3de97
9 changed files with 22 additions and 23 deletions

View file

@ -588,7 +588,6 @@ export class Files extends Model {
fetchPost("/api/filetree/listDocsByPath", {
notebook: toURL,
path: toDir === "/" ? "/" : toDir + ".sy",
sort: window.siyuan.config.fileTree.sort,
}, response => {
if (response.data.path === "/" && response.data.files.length === 0) {
showMessage(window.siyuan.languages.emptyContent);
@ -883,8 +882,7 @@ export class Files extends Model {
} else if (filePath.startsWith(item.path.replace(".sy", ""))) {
fetchPost("/api/filetree/listDocsByPath", {
notebook: data.box,
path: item.path,
sort: window.siyuan.config.fileTree.sort
path: item.path
}, response => {
this.selectItem(response.data.box, filePath, response.data);
});
@ -926,7 +924,6 @@ export class Files extends Model {
fetchPost("/api/filetree/listDocsByPath", {
notebook: notebookId,
path: liElement.getAttribute("data-path"),
sort: window.siyuan.config.fileTree.sort,
}, response => {
if (response.data.path === "/" && response.data.files.length === 0) {
showMessage(window.siyuan.languages.emptyContent);
@ -966,8 +963,7 @@ export class Files extends Model {
} else {
fetchPost("/api/filetree/listDocsByPath", {
notebook: notebookId,
path: currentPath,
sort: window.siyuan.config.fileTree.sort
path: currentPath
}, response => {
this.onLsSelect(response.data, filePath);
});

View file

@ -510,8 +510,7 @@ export class MobileFiles extends Model {
} else if (filePath.startsWith(item.path.replace(".sy", ""))) {
fetchPost("/api/filetree/listDocsByPath", {
notebook: data.box,
path: item.path,
sort: window.siyuan.config.fileTree.sort
path: item.path
}, response => {
this.selectItem(response.data.box, filePath, response.data);
});
@ -555,8 +554,7 @@ export class MobileFiles extends Model {
}
fetchPost("/api/filetree/listDocsByPath", {
notebook: notebookId,
path: liElement.getAttribute("data-path"),
sort: window.siyuan.config.fileTree.sort,
path: liElement.getAttribute("data-path")
}, response => {
if (response.data.path === "/" && response.data.files.length === 0) {
showMessage(window.siyuan.languages.emptyContent);
@ -596,8 +594,7 @@ export class MobileFiles extends Model {
} else {
fetchPost("/api/filetree/listDocsByPath", {
notebook: notebookId,
path: currentPath,
sort: window.siyuan.config.fileTree.sort
path: currentPath
}, response => {
this.onLsSelect(response.data, filePath);
});

View file

@ -454,7 +454,6 @@ const getLeaf = (liElement: HTMLElement, flashcard:boolean) => {
fetchPost("/api/filetree/listDocsByPath", {
notebook: notebookId,
path: liElement.getAttribute("data-path"),
sort: window.siyuan.config.fileTree.sort,
flashcard,
}, response => {
if (response.data.path === "/" && response.data.files.length === 0) {