This commit is contained in:
parent
f76d041d03
commit
f375a085ce
2 changed files with 10 additions and 12 deletions
|
@ -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 += `<li class="b3-list-item" data-command="${key}">
|
||||
// <span class="b3-list-item__text">${window.siyuan.languages[key]}</span>
|
||||
// <span class="b3-list-item__meta${isMobile() ? " fn__none" : ""}">${updateHotkeyTip(window.siyuan.config.keymap.general[key].custom)}</span>
|
||||
// </li>`;
|
||||
// });
|
||||
// listElement.insertAdjacentHTML("beforeend", html);
|
||||
let html = ""
|
||||
Object.keys(window.siyuan.config.keymap.general).forEach((key) => {
|
||||
if (["addToDatabase"].includes(key)) {
|
||||
html += `<li class="b3-list-item" data-command="${key}">
|
||||
<span class="b3-list-item__text">${window.siyuan.languages[key]}</span>
|
||||
<span class="b3-list-item__meta${isMobile() ? " fn__none" : ""}">${updateHotkeyTip(window.siyuan.config.keymap.general[key].custom)}</span>
|
||||
</li>`;
|
||||
}
|
||||
});
|
||||
listElement.insertAdjacentHTML("beforeend", html);
|
||||
/// #endif
|
||||
app.plugins.forEach(plugin => {
|
||||
plugin.commands.forEach(command => {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue