mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
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);
|
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 => {
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue