Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:rotating_light:

Vanessa87051328507b
diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.ts
index 475ff57e26..cb66b6a5fd 100644
--- a/app/src/boot/onGetConfig.ts
+++ b/app/src/boot/onGetConfig.ts
@@ -99,23 +99,23 @@ const mergePluginHotkey = (app: App) => {
custom: command.hotkey,
}
};
- return
+ return;
}
if (!window.siyuan.config.keymap.plugin[plugin.name][command.langKey]) {
command.customHotkey = command.hotkey;
window.siyuan.config.keymap.plugin[plugin.name][command.langKey] = {
default: command.hotkey,
custom: command.hotkey,
- }
+ };
return;
}
if (window.siyuan.config.keymap.plugin[plugin.name][command.langKey]) {
command.customHotkey = window.siyuan.config.keymap.plugin[plugin.name][command.langKey].custom || command.hotkey;
- window.siyuan.config.keymap.plugin[plugin.name][command.langKey]["default"] = command.hotkey
+ window.siyuan.config.keymap.plugin[plugin.name][command.langKey]["default"] = command.hotkey;
}
- })
- })
-}
+ });
+ });
+};
export const onGetConfig = (isStart: boolean, app: App) => {
const matchKeymap1 = matchKeymap(Constants.SIYUAN_KEYMAP.general, "general");
diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts
index d30b3890a9..e58abc4453 100644
--- a/app/src/config/keymap.ts
+++ b/app/src/config/keymap.ts
@@ -33,9 +33,9 @@ export const keymap = {
return html;
},
genHTML(app: App) {
- let pluginHtml = ''
+ let pluginHtml = "";
app.plugins.forEach(item => {
- let commandHTML = ''
+ let commandHTML = "";
item.commands.forEach(command => {
const keyValue = updateHotkeyTip(command.customHotkey);
commandHTML += `<label class="b3-list-item b3-list-item--narrow b3-list-item--hide-action">
@@ -61,9 +61,9 @@ export const keymap = {
<div class="fn__none b3-list__panel">
${commandHTML}
</div>
-</div>`
+</div>`;
}
- })
+ });
if (pluginHtml) {
pluginHtml = `<div class="b3-list b3-list--border b3-list--background">
<div class="b3-list-item b3-list-item--narrow toggle">
@@ -73,7 +73,7 @@ export const keymap = {
<span class="b3-list-item__text ft__on-surface">${window.siyuan.languages.plugin}</span>
</div>
${pluginHtml}
-</div>`
+</div>`;
}
return `<label class="fn__flex b3-label config__item">
<span class="fn__flex-center">${window.siyuan.languages.keymapTip}</span>
@@ -243,14 +243,14 @@ export const keymap = {
},
_getTip(element: HTMLElement) {
const thirdElement = element.parentElement;
- let tip = thirdElement.querySelector(".b3-list-item__text").textContent.trim()
+ let tip = thirdElement.querySelector(".b3-list-item__text").textContent.trim();
const secondElement = thirdElement.parentElement.previousElementSibling;
tip = secondElement.textContent.trim() + "-" + tip;
const firstElement = secondElement.parentElement.previousElementSibling;
if (firstElement.classList.contains("b3-list-item")) {
tip = firstElement.textContent.trim() + "-" + tip;
}
- return tip
+ return tip;
},
bindEvent() {
keymap.element.querySelector("#keymapRefreshBtn").addEventListener("click", () => {
@@ -372,7 +372,7 @@ export const keymap = {
showMessage(`${window.siyuan.languages.keymap} [${keymap._getTip(this)}] ${window.siyuan.languages.invalid}`);
return;
}
- const hasConflict = Array.from(keymap.element.querySelectorAll("label.b3-list-item input")).find(inputItem => {
+ const hasConflict = Array.from(keymap.element.querySelectorAll("label.b3-list-item input")).find((inputItem: HTMLElement) => {
if (!inputItem.isSameNode(this) && inputItem.getAttribute("data-value") === keymapStr) {
const inputValueList = inputItem.getAttribute("data-key").split(Constants.ZWSP);
if (inputValueList[1] === "list") {