An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: av enable and disable
Vanessa6b490db0ebf6
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.tsindex 6926286780..d3b0c5a087 100644--- a/app/src/protyle/util/onGet.ts+++ b/app/src/protyle/util/onGet.ts@@ -17,6 +17,7 @@ import {foldPassiveType} from "../wysiwyg/renderBacklink";import {showMessage} from "../../dialog/message";import {avRender} from "../render/av/render";import {hideTooltip} from "../../dialog/tooltip";+import {stickyRow} from "../render/av/row";export const onGet = (options: {data: IWebSocketData,@@ -329,6 +330,13 @@ export const disabledProtyle = (protyle: IProtyle) => {protyle.wysiwyg.element.querySelectorAll('.protyle-action[draggable="true"]').forEach(item => {item.setAttribute("draggable", "false");});+ protyle.wysiwyg.element.querySelectorAll('.av').forEach((item: HTMLElement) => {+ const headerElement = item.querySelector(".av__row--header") as HTMLElement;+ if (headerElement) {+ headerElement.style.transform = "";+ (item.querySelector(".av__row--footer") as HTMLElement).style.transform = "";+ }+ });if (protyle.breadcrumb) {protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"] use').setAttribute("xlink:href", "#iconLock");protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]').setAttribute("aria-label", window.siyuan.config.editor.readOnly ? window.siyuan.languages.tempUnlock : window.siyuan.languages.unlockEdit);@@ -366,6 +374,10 @@ export const enableProtyle = (protyle: IProtyle) => {protyle.wysiwyg.element.querySelectorAll('.protyle-action[draggable="false"]').forEach(item => {item.setAttribute("draggable", "true");});+ const contentRect = protyle.contentElement.getBoundingClientRect();+ protyle.wysiwyg.element.querySelectorAll('.av').forEach((item: HTMLElement) => {+ stickyRow(item, contentRect, "all");+ });if (protyle.breadcrumb) {protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"] use').setAttribute("xlink:href", "#iconUnlock");protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]').setAttribute("aria-label", window.siyuan.config.editor.readOnly ? window.siyuan.languages.cancelTempUnlock : window.siyuan.languages.lockEdit);