Skip to content

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

:rotating_light:

Vanessa5781bb635668
diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts
index d56f3abf1c..3fb50e7bb7 100644
--- a/app/src/config/keymap.ts
+++ b/app/src/config/keymap.ts
@@ -15,7 +15,7 @@ export const keymap = {
let html = "";
Object.keys(keymap).forEach(key => {
if (window.siyuan.languages[key]) {
- const keyValue = updateHotkeyTip(keymap[key].custom)
+ const keyValue = updateHotkeyTip(keymap[key].custom);
html += `<label class="b3-list-item b3-list-item--narrow b3-list-item--hide-action">
<span class="b3-list-item__text">${window.siyuan.languages[key]}</span>
<span data-type="reset" class="b3-list-item__action b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.reset}">
@@ -340,9 +340,9 @@ export const keymap = {
});
item.addEventListener("blur", function () {
setTimeout(() => {
- this.classList.add("fn__none")
- this.previousElementSibling.textContent = this.value
- this.previousElementSibling.classList.remove("fn__none")
+ this.classList.add("fn__none");
+ this.previousElementSibling.textContent = this.value;
+ this.previousElementSibling.classList.remove("fn__none");
}, Constants.TIMEOUT_INPUT); // 隐藏的话点击删除无法 target 会为 li
});
});
diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts
index 3519829d7d..44382df381 100644
--- a/app/src/menus/commonMenuItem.ts
+++ b/app/src/menus/commonMenuItem.ts
@@ -294,7 +294,7 @@ const genAttr = (attrs: IObject, focusName = "bookmark", cb: (dialog: Dialog, rm
}
bindAttrInput(item, btnsElement[2]);
});
-}
+};
export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark") => {
genAttr(attrs, focusName, (dialog) => {
@@ -307,7 +307,7 @@ export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark")
if (item.tagName === "INPUT") {
return;
}
- name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value
+ name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value;
}
if (item.value.trim()) {
if (!/^[0-9a-zA-Z\-]*$/.test(name.replace("custom-", "")) || name === "custom-") {
@@ -359,7 +359,7 @@ export const openFileAttr = (attrs: IObject, id: string, focusName = "bookmark")
/// #endif
});
dialog.destroy();
- })
+ });
};
export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "bookmark") => {
@@ -378,7 +378,7 @@ export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "b
if (item.tagName === "INPUT") {
return;
}
- name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value
+ name = "custom-" + (item.parentElement.querySelector(".b3-text-field") as HTMLInputElement).value;
}
if (item.value.trim()) {
if (!/^[0-9a-zA-Z\-]*$/.test(name.replace("custom-", "")) || name === "custom-") {
@@ -432,7 +432,7 @@ export const openAttr = (nodeElement: Element, protyle: IProtyle, focusName = "b
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML);
dialog.destroy();
- })
+ });
});
};
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index c7bca12711..bd41ff9d6a 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -428,10 +428,10 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
if (operation.action === "updateAttrs") { // 调用接口才推送
const data = operation.data as any;
const attrsResult: IObject = {};
- let bookmarkHTML = ''
- let nameHTML = ''
- let aliasHTML = ''
- let memoHTML = ''
+ let bookmarkHTML = "";
+ let nameHTML = "";
+ let aliasHTML = "";
+ let memoHTML = "";
Object.keys(data.new).forEach(key => {
attrsResult[key] = data.new[key];
const escapeHTML = Lute.EscapeHTMLStr(data.new[key]);