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/15265

Vanessaf99a6d225cd4
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index a5f51740ac..65de6973e1 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -16,6 +16,7 @@ import {isInAndroid, isInHarmony, isInIOS} from "../../util/compatibility";
import {isMobile} from "../../../util/functions";
import {renderGallery} from "./gallery/render";
import {getViewIcon} from "./view";
+import {openMenuPanel} from "./openMenuPanel";
export const avRender = (element: Element, protyle: IProtyle, cb?: (data: IAV) => void, renderAll = true) => {
let avElements: Element[] = [];
@@ -582,6 +583,8 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
}
});
}
+ } else if (operation.action === "addAttrViewView") {
+ openMenuPanel({protyle, blockElement: item, type: "config"});
}
}
item.removeAttribute("data-loading");
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index 188273164e..22a919d4e0 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -408,7 +408,7 @@ export const enableProtyle = (protyle: IProtyle) => {
});
const contentRect = protyle.contentElement.getBoundingClientRect();
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
- if (item.querySelector(".av__title")) {
+ if (item.querySelector(".av__scroll")) {
stickyRow(item, contentRect, "all");
}
});
diff --git a/app/src/protyle/util/resize.ts b/app/src/protyle/util/resize.ts
index c1a88599c8..b8cdd5c469 100644
--- a/app/src/protyle/util/resize.ts
+++ b/app/src/protyle/util/resize.ts
@@ -59,7 +59,7 @@ export const resize = (protyle: IProtyle) => {
if (!protyle.disabled) {
const contentRect = protyle.contentElement.getBoundingClientRect();
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
- if (item.querySelector(".av__title")) {
+ if (item.querySelector(".av__scroll")) {
stickyRow(item, contentRect, "all");
}
});
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 631180bf63..8a891d68de 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -1681,7 +1681,7 @@ export class WYSIWYG {
protyle.observer = new ResizeObserver(() => {
const contentRect = protyle.contentElement.getBoundingClientRect();
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
- if (item.querySelector(".av__title")) {
+ if (item.querySelector(".av__scroll")) {
stickyRow(item, contentRect, "all");
}
});