From f375a085ce42f08cf8cbd4dd9a4bcdad6b455a82 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 30 Apr 2024 11:53:51 +0800 Subject: [PATCH] :sparkles: https://github.com/siyuan-note/siyuan/issues/11133 --- app/src/boot/globalEvent/commandPanel.ts | 18 ++++++++++-------- app/src/layout/dock/Files.ts | 4 ---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app/src/boot/globalEvent/commandPanel.ts b/app/src/boot/globalEvent/commandPanel.ts index 53384be3f..354f1a5ca 100644 --- a/app/src/boot/globalEvent/commandPanel.ts +++ b/app/src/boot/globalEvent/commandPanel.ts @@ -37,14 +37,16 @@ export const commandPanel = (app: App) => { dialog.element.setAttribute("data-key", Constants.DIALOG_COMMANDPANEL); const listElement = dialog.element.querySelector("#commands"); /// #if !MOBILE -// let html = "" -// Object.keys(window.siyuan.config.keymap.general).forEach((key) => { -// html += `
  • -// ${window.siyuan.languages[key]} -// ${updateHotkeyTip(window.siyuan.config.keymap.general[key].custom)} -//
  • `; -// }); -// listElement.insertAdjacentHTML("beforeend", html); + let html = "" + Object.keys(window.siyuan.config.keymap.general).forEach((key) => { + if (["addToDatabase"].includes(key)) { + html += `
  • + ${window.siyuan.languages[key]} + ${updateHotkeyTip(window.siyuan.config.keymap.general[key].custom)} +
  • `; + } + }); + listElement.insertAdjacentHTML("beforeend", html); /// #endif app.plugins.forEach(plugin => { plugin.commands.forEach(command => { diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts index 59e51baaa..763866767 100644 --- a/app/src/layout/dock/Files.ts +++ b/app/src/layout/dock/Files.ts @@ -360,10 +360,6 @@ export class Files extends Model { } target = target.parentElement; } - } else { - this.element.querySelectorAll(".b3-list-item--focus").forEach((item: HTMLElement) => { - item.classList.remove("b3-list-item--focus"); - }); } if (needFocus) { setPanelFocus(this.element.parentElement);