Skip to content

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

:rotating_light:

Vanessa671667981d0d
diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts
index 9090e46720..6ce2c81af5 100644
--- a/app/src/block/Panel.ts
+++ b/app/src/block/Panel.ts
@@ -216,7 +216,7 @@ export class BlockPanel {
this.element = undefined;
this.targetElement = undefined;
// 移除弹出上使用右键菜单
- const menuLevel = parseInt(window.siyuan.menus.menu.element.dataset.from)
+ const menuLevel = parseInt(window.siyuan.menus.menu.element.dataset.from);
if (window.siyuan.menus.menu.element.dataset.from !== "app" && menuLevel && menuLevel >= level) {
// https://github.com/siyuan-note/siyuan/issues/9854 右键菜单不是从浮窗中弹出的则不进行移除
window.siyuan.menus.menu.remove();
diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts
index 310c04d510..6464983e43 100644
--- a/app/src/block/popover.ts
+++ b/app/src/block/popover.ts
@@ -182,7 +182,7 @@ const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => {
if (blockElement) {
for (let i = window.siyuan.blockPanels.length - 1; i >= 0; i--) {
const item = window.siyuan.blockPanels[i];
- const itemLevel = parseInt(item.element.getAttribute("data-level"))
+ const itemLevel = parseInt(item.element.getAttribute("data-level"));
if ((item.targetElement || typeof item.x === "number") &&
itemLevel > (maxEditLevels[item.element.getAttribute("data-oid")] || 0) &&
item.element.getAttribute("data-pin") === "false" &&
diff --git a/app/src/constants.ts b/app/src/constants.ts
index 06e319ccb3..76dbd7021f 100644
--- a/app/src/constants.ts
+++ b/app/src/constants.ts
@@ -9,12 +9,12 @@ const _NODE_ENV = NODE_ENV;
const altNumber = navigator.platform.toUpperCase().indexOf("MAC") > -1 ? "⌃" : "⌥";
const getFunctionKey = () => {
- const fData: { [key: number]: string } = {}
+ const fData: { [key: number]: string } = {};
for (let i = 1; i <= 32; i++) {
fData[i + 111] = "F" + i;
}
return fData;
-}
+};
export abstract class Constants {
public static readonly SIYUAN_VERSION: string = _SIYUAN_VERSION;
diff --git a/app/src/protyle/render/abcRender.ts b/app/src/protyle/render/abcRender.ts
index b8abbe46ae..c7ab4ff914 100644
--- a/app/src/protyle/render/abcRender.ts
+++ b/app/src/protyle/render/abcRender.ts
@@ -16,7 +16,7 @@ export const abcRender = (element: Element, cdn = Constants.PROTYLE_CDN) => {
}
if (abcElements.length > 0) {
addScript(`${cdn}/js/abcjs/abcjs-basic-min.js?v=6.2.2`, "protyleAbcjsScript").then(() => {
- const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true);
abcElements.forEach((e: HTMLDivElement) => {
if (e.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/render/av/rollup.ts b/app/src/protyle/render/av/rollup.ts
index 61fbb62c69..554310307f 100644
--- a/app/src/protyle/render/av/rollup.ts
+++ b/app/src/protyle/render/av/rollup.ts
@@ -4,7 +4,6 @@ import {upDownHint} from "../../../util/upDownHint";
import {fetchPost} from "../../../util/fetch";
import {escapeHtml} from "../../../util/escape";
import {transaction} from "../../wysiwyg/transaction";
-import {genIconHTML} from "../util";
import {unicode2Emoji} from "../../../emoji";
import {getColIconByType} from "./col";
import {showMessage} from "../../../dialog/message";
diff --git a/app/src/protyle/render/chartRender.ts b/app/src/protyle/render/chartRender.ts
index 413e62cb17..1243d205a2 100644
--- a/app/src/protyle/render/chartRender.ts
+++ b/app/src/protyle/render/chartRender.ts
@@ -30,7 +30,7 @@ export const chartRender = (element: Element, cdn = Constants.PROTYLE_CDN) => {
});
}
}
- const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true);
echartsElements.forEach(async (e: HTMLDivElement) => {
if (e.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/render/flowchartRender.ts b/app/src/protyle/render/flowchartRender.ts
index cd4060d5d4..7415723c42 100644
--- a/app/src/protyle/render/flowchartRender.ts
+++ b/app/src/protyle/render/flowchartRender.ts
@@ -36,7 +36,7 @@ export const flowchartRender = (element: Element, cdn = Constants.PROTYLE_CDN) =
};
const initFlowchart = (flowchartElements: Element[]) => {
- const wysiswgElement = hasClosestByClassName(flowchartElements[0], "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(flowchartElements[0], "protyle-wysiwyg", true);
flowchartElements.forEach((item: HTMLElement) => {
if (item.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/render/graphvizRender.ts b/app/src/protyle/render/graphvizRender.ts
index eaf3cb72e8..412cd26cf9 100644
--- a/app/src/protyle/render/graphvizRender.ts
+++ b/app/src/protyle/render/graphvizRender.ts
@@ -15,7 +15,7 @@ export const graphvizRender = (element: Element, cdn = Constants.PROTYLE_CDN) =>
return;
}
addScript(`${cdn}/js/graphviz/viz.js?v=0.0.0`, "protyleGraphVizScript").then(() => {
- const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true);
graphvizElements.forEach((e: HTMLDivElement) => {
if (e.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/render/mermaidRender.ts b/app/src/protyle/render/mermaidRender.ts
index 625952232e..806bcc00c1 100644
--- a/app/src/protyle/render/mermaidRender.ts
+++ b/app/src/protyle/render/mermaidRender.ts
@@ -57,7 +57,7 @@ export const mermaidRender = (element: Element, cdn = Constants.PROTYLE_CDN) =>
};
const initMermaid = (mermaidElements: Element[]) => {
- const wysiswgElement = hasClosestByClassName(mermaidElements[0], "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(mermaidElements[0], "protyle-wysiwyg", true);
mermaidElements.forEach(async (item: HTMLElement) => {
if (item.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/render/mindmapRender.ts b/app/src/protyle/render/mindmapRender.ts
index 2acb3348ca..f640f3a5b5 100644
--- a/app/src/protyle/render/mindmapRender.ts
+++ b/app/src/protyle/render/mindmapRender.ts
@@ -27,7 +27,7 @@ export const mindmapRender = (element: Element, cdn = Constants.PROTYLE_CDN) =>
});
}
}
- const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true);
mindmapElements.forEach((e: HTMLDivElement) => {
if (e.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/render/plantumlRender.ts b/app/src/protyle/render/plantumlRender.ts
index 1d3a5cf672..17b2a7b2be 100644
--- a/app/src/protyle/render/plantumlRender.ts
+++ b/app/src/protyle/render/plantumlRender.ts
@@ -15,7 +15,7 @@ export const plantumlRender = (element: Element, cdn = Constants.PROTYLE_CDN) =>
return;
}
addScript(`${cdn}/js/plantuml/plantuml-encoder.min.js?v=0.0.0`, "protylePlantumlScript").then(() => {
- const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true)
+ const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true);
plantumlElements.forEach((e: HTMLDivElement) => {
if (e.getAttribute("data-render") === "true") {
return;
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index 45c96adb54..d06015b77c 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -299,7 +299,7 @@ export const disabledProtyle = (protyle: IProtyle) => {
protyle.wysiwyg.element.querySelectorAll(".render-node .protyle-action__edit").forEach(item => {
item.classList.add("fn__none");
if (item.classList.contains("protyle-icon--first")) {
- item.nextElementSibling?.classList.add("protyle-icon--first")
+ item.nextElementSibling?.classList.add("protyle-icon--first");
}
});
protyle.wysiwyg.element.style.userSelect = "text";
@@ -357,7 +357,7 @@ export const enableProtyle = (protyle: IProtyle) => {
protyle.wysiwyg.element.querySelectorAll(".render-node .protyle-action__edit").forEach(item => {
item.classList.remove("fn__none");
if (item.classList.contains("protyle-icon--first")) {
- item.nextElementSibling?.classList.remove("protyle-icon--first")
+ item.nextElementSibling?.classList.remove("protyle-icon--first");
}
});
protyle.wysiwyg.element.querySelectorAll('[contenteditable="false"][spellcheck]').forEach(item => {