瀏覽代碼

:art: Improve inbox move https://ld246.com/article/1732765275719

Daniel 8 月之前
父節點
當前提交
5dc73d0be6
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      app/src/layout/dock/Inbox.ts

+ 5 - 1
app/src/layout/dock/Inbox.ts

@@ -339,11 +339,15 @@ ${data.shorthandContent}
                     id: item
                 }, (response) => {
                     this.data[response.data.oId] = response.data;
+                    let md = response.data.shorthandMd;
+                    if ("" === md && "" === response.data.shorthandContent && "" != response.data.shorthandURL) {
+                        md = "[" + response.data.shorthandTitle + "](" + response.data.shorthandURL + ")";
+                    }
                     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.shorthandMd,
+                        md: md,
                     }, () => {
                         this.remove(item);
                     });