From 84b7b0aa8b5d6d056730b449c7b55650cc8012d0 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 29 Nov 2023 09:29:01 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/9771 --- app/src/layout/dock/Inbox.ts | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/app/src/layout/dock/Inbox.ts b/app/src/layout/dock/Inbox.ts index a70c28b93..1c75cd880 100644 --- a/app/src/layout/dock/Inbox.ts +++ b/app/src/layout/dock/Inbox.ts @@ -46,7 +46,7 @@ export class Inbox extends Model {
-
+
`; /// #else this.element.classList.add("fn__flex-column", "file-tree", "sy__inbox"); @@ -71,7 +71,7 @@ export class Inbox extends Model {
-
+
`; /// #endif const countElement = this.element.querySelector(".inboxSelectCount"); @@ -284,14 +284,19 @@ ${(Lute.New()).MarkdownStr("", data.shorthandContent)} private move(ids: string[]) { movePathTo((toPath, toNotebook) => { ids.forEach(item => { - fetchPost("/api/filetree/createDoc", { - notebook: toNotebook[0], - path: pathPosix().join(getDisplayName(toPath[0], false, true), Lute.NewNodeID() + ".sy"), - title: replaceFileName(this.data[item].shorthandTitle), - md: this.data[item].shorthandContent, - }, () => { - this.remove(item); - }); + fetchPost("/api/inbox/getShorthand", { + id: item + }, (response) => { + fetchPost("/api/filetree/createDoc", { + notebook: toNotebook[0], + path: pathPosix().join(getDisplayName(toPath[0], false, true), Lute.NewNodeID() + ".sy"), + title: replaceFileName(response.data.shorthandTitle), + md: response.data.shorthandContent, + }, () => { + this.remove(item); + }); + }) + }); }); }