Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/9888

Vanessa504d3f6155ed
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts
index dc9380117c..984e63f2cf 100644
--- a/app/src/protyle/render/av/col.ts
+++ b/app/src/protyle/render/av/col.ts
@@ -335,13 +335,13 @@ export const bindEditEvent = (options: {
});
const goSearchElement = options.menuElement.querySelector('[data-type="goSearchAV"]') as HTMLElement;
const oldValue = JSON.parse(goSearchElement.getAttribute("data-old-value"))
- const inputElement = options.menuElement.querySelector('[data-type="colName"]') as HTMLInputElement
+ const inputElement = options.menuElement.querySelector('[data-type="colName"]') as HTMLInputElement
inputElement.addEventListener("input", () => {
toggleUpdateRelationBtn(options.menuElement, avID);
})
if (oldValue.avID) {
fetchPost("/api/av/getAttributeView", {id: oldValue.avID}, (response) => {
- goSearchElement.querySelector(".b3-menu__accelerator").textContent = response.data.av.name || window.siyuan.languages.title;
+ goSearchElement.querySelector(".b3-menu__accelerator").textContent = oldValue.avID === avID ? window.siyuan.languages.thisDatabase : (response.data.av.name || window.siyuan.languages.title)
response.data.av.keyValues.find((item: { key: { id: string, name: string } }) => {
if (item.key.id === oldValue.backKeyID) {
inputElement.setAttribute("data-old-value", item.key.name || window.siyuan.languages.title);
diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.ts
index f00f709762..9cc6c2bf65 100644
--- a/app/src/protyle/render/av/relation.ts
+++ b/app/src/protyle/render/av/relation.ts
@@ -123,7 +123,7 @@ export const toggleUpdateRelationBtn = (menuItemsElement: HTMLElement, avId: str
const btnElement = inputItemElement.nextElementSibling;
const oldValue = JSON.parse(searchElement.dataset.oldValue);
if (oldValue.avID) {
- if (searchElement.dataset.avId !== avId) {
+ if (searchElement.dataset.avId !== avId || (searchElement.dataset.avId === avId && oldValue.avID !== avId)) {
switchItemElement.classList.remove("fn__none");
if (switchElement.checked) {
inputItemElement.classList.remove("fn__none");