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

Vanessaab9154160023
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 501997ca5b..fc095f5964 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -471,6 +471,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
let submenu: IMenu[] = [];
if (element.getAttribute("data-subtype") === "s") {
submenu.push({
+ iconHTML: "",
label: window.siyuan.languages.turnToDynamic,
click() {
element.setAttribute("data-subtype", "d");
@@ -485,6 +486,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
});
} else {
submenu.push({
+ iconHTML: "",
label: window.siyuan.languages.turnToStatic,
click() {
element.setAttribute("data-subtype", "s");
@@ -496,6 +498,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
});
}
submenu = submenu.concat([{
+ iconHTML: "",
label: window.siyuan.languages.text,
click() {
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
@@ -504,6 +507,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
oldHTML = nodeElement.outerHTML;
}
}, {
+ iconHTML: "",
label: "*",
click() {
element.setAttribute("data-subtype", "s");
@@ -514,6 +518,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
oldHTML = nodeElement.outerHTML;
}
}, {
+ iconHTML: "",
label: window.siyuan.languages.text + " *",
click() {
element.insertAdjacentHTML("beforebegin", element.innerHTML + " ");
@@ -526,7 +531,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
}
}, {
label: window.siyuan.languages.link,
- icon: "iconLink",
+ iconHTML: "",
click() {
element.outerHTML = `<span data-type="a" data-href="siyuan://blocks/${element.getAttribute("data-id")}">${element.innerHTML}</span><wbr>`;
nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));
@@ -537,8 +542,8 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
}]);
if (element.parentElement.textContent.trim() === element.textContent.trim() && element.parentElement.tagName === "DIV") {
submenu.push({
+ iconHTML: "",
label: window.siyuan.languages.blockEmbed,
- icon: "iconSQL",
click() {
const html = `<div data-content="select * from blocks where id='${refBlockId}'" data-node-id="${id}" data-type="NodeBlockQueryEmbed" class="render-node" updated="${dayjs().format("YYYYMMDDHHmmss")}">${nodeElement.querySelector(".protyle-attr").outerHTML}</div>`;
nodeElement.outerHTML = html;
@@ -549,6 +554,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
});
}
submenu.push({
+ iconHTML: "",
label: window.siyuan.languages.defBlock,
click() {
fetchPost("/api/block/swapBlockRef", {
@@ -559,6 +565,7 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
}
});
submenu.push({
+ iconHTML: "",
label: window.siyuan.languages.defBlockChildren,
click() {
fetchPost("/api/block/swapBlockRef", {