mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 06:05:29 +01:00
This commit is contained in:
parent
cbad03815d
commit
bd89dd67e1
3 changed files with 58 additions and 2 deletions
|
|
@ -54,6 +54,24 @@ export const keymap = {
|
|||
<input data-key="plugin${Constants.ZWSP}${item.name}${Constants.ZWSP}${command.langKey}" data-value="${command.customHotkey}" data-default="${command.hotkey}" class="b3-text-field fn__none" value="${keyValue}" spellcheck="false">
|
||||
</label>`;
|
||||
});
|
||||
item.updateProtyleToolbar([]).forEach(toolbarItem => {
|
||||
if (typeof toolbarItem === "string" || Constants.INLINE_TYPE.concat("|").includes(toolbarItem.name) || !toolbarItem.hotkey) {
|
||||
return
|
||||
}
|
||||
const dockKeymap = window.siyuan.config.keymap.plugin[item.name][toolbarItem.name];
|
||||
const keyValue = updateHotkeyTip(dockKeymap.custom);
|
||||
commandHTML += `<label class="b3-list-item b3-list-item--narrow b3-list-item--hide-action">
|
||||
<span class="b3-list-item__text">${toolbarItem.tip||window.siyuan.languages[toolbarItem.lang]}</span>
|
||||
<span data-type="reset" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.reset}">
|
||||
<svg><use xlink:href="#iconUndo"></use></svg>
|
||||
</span>
|
||||
<span data-type="clear" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.remove}">
|
||||
<svg><use xlink:href="#iconTrashcan"></use></svg>
|
||||
</span>
|
||||
<span data-type="update" class="config-keymap__key">${keyValue}</span>
|
||||
<input data-key="plugin${Constants.ZWSP}${item.name}${Constants.ZWSP}${toolbarItem.name}" data-value="${dockKeymap.custom}" data-default="${dockKeymap.default}" class="b3-text-field fn__none" value="${keyValue}" spellcheck="false">
|
||||
</label>`;
|
||||
})
|
||||
Object.keys(item.docks).forEach(key => {
|
||||
const dockConfig = item.docks[key].config;
|
||||
if (!dockConfig.hotkey) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue