Skip to content

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

:bug: Disable block attributes and list action tooltips in Protyle Lite https://github.com/siyuan-note/siyuan/issues/19137

Danielc9498f8c87e1
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index 550a687bc5..6854fa59db 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -70,6 +70,10 @@ export const initBlockPopover = (app: App) => {
}
const listItemActionElement = hasClosestByClassName(event.target, "protyle-action");
const isListItemAction = isListItemActionElement(listItemActionElement);
+ if (isListItemAction && (listItemActionElement as HTMLElement).closest(".protyle-lite-fragment")) {
+ hideTooltip();
+ return;
+ }
const aElement = (isListItemAction && listItemActionElement) ||
hasClosestByAttribute(event.target, "data-type", "a", true) ||
hasClosestByClassName(event.target, "ariaLabel") ||
diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts
index 4a40d3a409..ce38d22aca 100644
--- a/app/src/menus/commonMenuItem.ts
+++ b/app/src/menus/commonMenuItem.ts
@@ -425,7 +425,7 @@ export const openFileAttr = (attrs: Record<string, string>, focusName = "bookmar
};
export const openAttr = (nodeElement: Element, focusName = "bookmark", protyle: IProtyle) => {
- if (nodeElement.getAttribute("data-type") === "NodeThematicBreak") {
+ if (protyle.lite || nodeElement.getAttribute("data-type") === "NodeThematicBreak") {
return;
}
const id = nodeElement.getAttribute("data-node-id");