From da0afd39a8bc558a76a90fbe942b2bd49612a516 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 23 May 2023 20:38:39 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/8341 1 --- app/src/layout/util.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index 0ab6ba7e7..e7482bf30 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -256,7 +256,11 @@ const pushPluginDock = (app: App, dockItem: IDockTab[], position: TPluginDockPos }); } }); - dockItem.forEach(existSubItem => { + dockItem.forEach((existSubItem, index) => { + if (!["file", "outline", "inbox", "bookmark", "tag", "graph", "globalGraph", "backlink"].includes(existSubItem.type)) { + dockItem.splice(index, 1); + return; + } if (existSubItem.hotkeyLangId) { existSubItem.title = window.siyuan.languages[existSubItem.hotkeyLangId]; existSubItem.hotkey = window.siyuan.config.keymap.general[existSubItem.hotkeyLangId].custom; @@ -944,7 +948,7 @@ export const newCenterEmptyTab = (app: App) => { let target = event.target as HTMLElement; while (target && !target.isEqualNode(tab.panelElement)) { if (target.id === "editorEmptySearch") { - openSearch( { + openSearch({ app, hotkey: window.siyuan.config.keymap.general.globalSearch.custom, });