Skip to content

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

:rotating_light:

Vanessa6fa73640677f
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index 2dddeab03e..16102dcc19 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -46,11 +46,11 @@ export const hintSlash = (key: string, protyle: IProtyle) => {
filter: ["ai chat"],
value: Constants.ZWSP + 5,
html: '<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconSparkles"></use></svg><span class="b3-list-item__text">AI Chat</span></div>',
- }, {
+ }, /*{
filter: ["属性视图", "shuxingshitu", "sxst", "attribute view"],
value: '<div data-type="NodeAttributeView" data-av-type="table"></div>',
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconDatabase"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.attributeView}</span></div>`,
- }, {
+ },*/ {
filter: ["文档", "子文档", "wendang", "wd", "ziwendang", "zwd", "xjwd"],
value: Constants.ZWSP + 4,
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.newFile}</span><span class="b3-menu__accelerator">${updateHotkeyTip(window.siyuan.config.keymap.general.newFile.custom)}</span></div>`,
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index 58c79b4c04..099cdd6eff 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -249,6 +249,6 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => {
data: {
name: nameElement.dataset.title,
}
- }])
+ }]);
nameElement.dataset.title = nameElement.textContent.trim();
-}
+};
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts
index f78a278734..5f7fcc0075 100644
--- a/app/src/protyle/render/av/openMenuPanel.ts
+++ b/app/src/protyle/render/av/openMenuPanel.ts
@@ -252,15 +252,15 @@ const getConfigHTML = (data: IAV) => {
const bindSortsEvent = (protyle: IProtyle, menuElement: HTMLElement, data: IAV) => {
menuElement.querySelectorAll("select").forEach((item: HTMLSelectElement) => {
- item.addEventListener("change", (event) => {
+ item.addEventListener("change", () => {
const colId = item.parentElement.getAttribute("data-id");
const oldSort = JSON.parse(JSON.stringify(data.sorts));
if (item.previousElementSibling.classList.contains("b3-menu__icon")) {
data.sorts.find((sort: IAVSort) => {
if (sort.column === colId) {
- sort.column = item.value
+ sort.column = item.value;
item.parentElement.setAttribute("data-id", item.value);
- return true
+ return true;
}
});
} else {
@@ -281,17 +281,17 @@ const bindSortsEvent = (protyle: IProtyle, menuElement: HTMLElement, data: IAV)
}]);
});
});
-}
+};
const getSortsHTML = (data: IAV) => {
let html = "";
const genSortItem = (id: string) => {
- let sortHTML = ''
+ let sortHTML = "";
data.columns.forEach((item) => {
- sortHTML += `<option value="${item.id}" ${item.id === id ? "selected" : ""}>${item.name}</option>`
- })
+ sortHTML += `<option value="${item.id}" ${item.id === id ? "selected" : ""}>${item.name}</option>`;
+ });
return sortHTML;
- }
+ };
data.sorts.forEach((item: IAVSort) => {
html += `<button class="b3-menu__item" data-id="${item.column}">
<svg class="b3-menu__icon"><use xlink:href="#iconDrag"></use></svg>
@@ -323,7 +323,7 @@ ${html}
<svg class="b3-menu__icon"><use xlink:href="#iconTrashcan"></use></svg>
<span class="b3-menu__label">${window.siyuan.languages.delete}</span>
</button>`;
-}
+};
const getPropertiesHTML = (data: IAV) => {
let showHTML = "";
@@ -435,5 +435,5 @@ const addSort = (options: {
x: options.rect.left,
y: options.rect.bottom,
h: options.rect.height,
- })
-}
+ });
+};
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index 89c56f2434..e63a9fd318 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -137,7 +137,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
}
lastElement = protyle.contentElement;
lastParentID = operation.parentID;
- const avId = operation.action === "setAttrView" ? operation.id : operation.parentID
+ const avId = operation.action === "setAttrView" ? operation.id : operation.parentID;
if (operation.action === "addAttrViewCol") {
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${avId}"]`)).forEach((item: HTMLElement) => {
item.removeAttribute("data-render");