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: fix https://github.com/siyuan-note/siyuan/issues/9420
Vanessa55fb8b19abf9
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scssindex eb74e61ba6..2ab5b4e2ea 100644--- a/app/src/assets/scss/business/_av.scss+++ b/app/src/assets/scss/business/_av.scss@@ -207,6 +207,12 @@top: 8px;}+ &--select {+ background-color: var(--b3-theme-primary-lightest);+ box-shadow: 2px 2px 0 var(--b3-theme-primary-lighter) inset, -2px -2px 0px var(--b3-theme-primary-lighter) inset;+ border-radius: var(--b3-border-radius);+ }+.block__icon {position: absolute;right: 5px;diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex 9933407381..7fd31b3181 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -45,6 +45,7 @@ import {hideElements} from "../protyle/ui/hideElements";import {emitOpenMenu} from "../plugin/EventBus";import {openMobileFileById} from "../mobile/editor";import {openBacklink, openGraph} from "../layout/dock/util";+import {updateHeader} from "../protyle/render/av/col";export const fileAnnotationRefMenu = (protyle: IProtyle, refElement: HTMLElement) => {const nodeElement = hasClosestBlock(refElement);@@ -1663,8 +1664,11 @@ export const setFold = (protyle: IProtyle, nodeElement: Element, isOpen?: booleafocusBlock(nodeElement, undefined, false);}}- nodeElement.querySelectorAll(".img--select").forEach((item) => {- item.classList.remove("img--select");+ nodeElement.querySelectorAll(".img--select, .av__cell--select, .av__row--select").forEach((item:HTMLElement) => {+ if (item.classList.contains("av__row--select")) {+ updateHeader(item);+ }+ item.classList.remove("img--select", "av__cell--select", "av__row--select");});}const id = nodeElement.getAttribute("data-node-id");diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.tsindex 0db8ddcb4f..468a3ff26d 100644--- a/app/src/protyle/render/av/cell.ts+++ b/app/src/protyle/render/av/cell.ts@@ -490,6 +490,7 @@ const updateCellValue = (protyle: IProtyle, type: TAVCol, cellElements: HTMLElemif (doOperations.length > 0) {transaction(protyle, doOperations, undoOperations);}+ cellElements[0].classList.add("av__cell--select");setTimeout(() => {avMaskElement.remove();});diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex d3e2967b93..1ab5979ae3 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -76,6 +76,7 @@ import {removeSearchMark} from "../toolbar/util";import {activeBlur, hideKeyboardToolbar} from "../../mobile/util/keyboardToolbar";import {commonClick} from "./commonClick";import {avClick, avContextmenu, updateAVName} from "../render/av/action";+import {updateHeader} from "../render/av/col";export class WYSIWYG {public lastHTMLs: { [key: string]: string } = {};@@ -185,10 +186,13 @@ export class WYSIWYG {private setEmptyOutline(protyle: IProtyle, element: HTMLElement) {// 图片移除选择状态应放在前面,否则 https://github.com/siyuan-note/siyuan/issues/4173- const selectImgElement = protyle.wysiwyg.element.querySelector(".img--select");- if (selectImgElement) {- selectImgElement.classList.remove("img--select");- }+ protyle.wysiwyg.element.querySelectorAll(".img--select, .av__cell--select, .av__row--select").forEach((item: HTMLElement) => {+ if (item.classList.contains("av__row--select")) {+ updateHeader(item);+ }+ item.classList.remove("img--select", "av__cell--select", "av__row--select");+ });+let nodeElement = element;if (!element.getAttribute("data-node-id")) {const tempElement = hasClosestBlock(element);