Vanessa 2024-04-30 11:53:51 +08:00
parent f76d041d03
commit f375a085ce
2 changed files with 10 additions and 12 deletions

View file

@ -37,14 +37,16 @@ export const commandPanel = (app: App) => {
dialog.element.setAttribute("data-key", Constants.DIALOG_COMMANDPANEL); dialog.element.setAttribute("data-key", Constants.DIALOG_COMMANDPANEL);
const listElement = dialog.element.querySelector("#commands"); const listElement = dialog.element.querySelector("#commands");
/// #if !MOBILE /// #if !MOBILE
// let html = "" let html = ""
// Object.keys(window.siyuan.config.keymap.general).forEach((key) => { Object.keys(window.siyuan.config.keymap.general).forEach((key) => {
// html += `<li class="b3-list-item" data-command="${key}"> if (["addToDatabase"].includes(key)) {
// <span class="b3-list-item__text">${window.siyuan.languages[key]}</span> html += `<li class="b3-list-item" data-command="${key}">
// <span class="b3-list-item__meta${isMobile() ? " fn__none" : ""}">${updateHotkeyTip(window.siyuan.config.keymap.general[key].custom)}</span> <span class="b3-list-item__text">${window.siyuan.languages[key]}</span>
// </li>`; <span class="b3-list-item__meta${isMobile() ? " fn__none" : ""}">${updateHotkeyTip(window.siyuan.config.keymap.general[key].custom)}</span>
// }); </li>`;
// listElement.insertAdjacentHTML("beforeend", html); }
});
listElement.insertAdjacentHTML("beforeend", html);
/// #endif /// #endif
app.plugins.forEach(plugin => { app.plugins.forEach(plugin => {
plugin.commands.forEach(command => { plugin.commands.forEach(command => {

View file

@ -360,10 +360,6 @@ export class Files extends Model {
} }
target = target.parentElement; target = target.parentElement;
} }
} else {
this.element.querySelectorAll(".b3-list-item--focus").forEach((item: HTMLElement) => {
item.classList.remove("b3-list-item--focus");
});
} }
if (needFocus) { if (needFocus) {
setPanelFocus(this.element.parentElement); setPanelFocus(this.element.parentElement);