diff --git a/app/src/search/spread.ts b/app/src/search/spread.ts index 97fb0445c..a9daa506b 100644 --- a/app/src/search/spread.ts +++ b/app/src/search/spread.ts @@ -686,7 +686,9 @@ const onSearch = (data: IBlock[], dialog: Dialog) => { const title = escapeHtml(getNotebookName(item.box)) + getDisplayName(item.hPath, false); resultHTML += `
-${unicode2Emoji(item.ial.icon)}${item.ial.icon ? " " : ""}${item.content} + +${unicode2Emoji(item.ial.icon, false, "b3-list-item__graphic", true)} +${item.content} ${title}
`; }); diff --git a/app/src/search/util.ts b/app/src/search/util.ts index ccf6eb6ca..1f9ddb34f 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -626,7 +626,8 @@ ${unicode2Emoji(getNotebookIcon(item.box) || Constants.SIYUAN_IMAGE_NOTE, false, item.children.forEach((childItem, childIndex) => { resultHTML += `
-${unicode2Emoji(childItem.ial.icon)}${childItem.ial.icon ? " " : ""}${childItem.content} +${unicode2Emoji(childItem.ial.icon, false, "b3-list-item__graphic", true)} +${childItem.content}
`; }) resultHTML += ""; @@ -634,7 +635,8 @@ ${unicode2Emoji(getNotebookIcon(item.box) || Constants.SIYUAN_IMAGE_NOTE, false, const title = escapeHtml(getNotebookName(item.box)) + getDisplayName(item.hPath, false); resultHTML += `
-${unicode2Emoji(item.ial.icon)}${item.ial.icon ? " " : ""}${item.content} +${unicode2Emoji(item.ial.icon, false, "b3-list-item__graphic", true)} +${item.content} ${title}
`; } diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index 14d9ddd2b..7c18fae87 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -380,9 +380,13 @@ export const globalShortcut = () => { }).forEach(item => { let icon = ``; let rootId = ""; + const initData = item.headElement.getAttribute("data-initdata") if (item.model instanceof Editor) { rootId = ` data-node-id="${item.model.editor.protyle.block.rootID}"`; icon = unicode2Emoji(item.docIcon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true); + } else if (initData) { + rootId = ` data-node-id="${JSON.parse(initData).rootId}"`; + icon = unicode2Emoji(item.docIcon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true); } tabHtml += `
  • ${icon}${escapeHtml(item.title)}
  • `; }); diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts index 05b434a11..74d199dc9 100644 --- a/app/src/util/pathName.ts +++ b/app/src/util/pathName.ts @@ -132,7 +132,7 @@ export const movePathTo = (paths?: string[], range?: Range, cb?: (toPath: string - ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_NOTE)} + ${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_NOTE, false, "b3-list-item__graphic", true)} ${escapeHtml(item.name)} `; } @@ -158,7 +158,7 @@ export const movePathTo = (paths?: string[], range?: Range, cb?: (toPath: string let fileHTML = ""; data.data.forEach((item: { boxIcon: string, box: string, hPath: string, path: string }) => { fileHTML += `
  • - ${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE)} + ${unicode2Emoji(item.boxIcon || Constants.SIYUAN_IMAGE_NOTE, false, "b3-list-item__graphic", true)} ${escapeHtml(item.hPath)}
  • `; });