Skip to content

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

:rotating_light:

Vanessa842e22fde674
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index 51e793b0aa..5a2ddcd9d9 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -6,10 +6,8 @@ import {fetchPost} from "../../util/fetch";
import {getAllModels} from "../getAll";
import {hasClosestByClassName} from "../../protyle/util/hasClosest";
import {updateHotkeyTip} from "../../protyle/util/compatibility";
-import {openFileById, updateBacklinkGraph} from "../../editor/util";
+import {openFileById} from "../../editor/util";
import {Constants} from "../../constants";
-import {focusBlock} from "../../protyle/util/selection";
-import {pushBack} from "../../util/backForward";
import {escapeHtml} from "../../util/escape";
import {unicode2Emoji} from "../../emoji";
import {onGet} from "../../protyle/util/onGet";
diff --git a/app/src/protyle/scroll/event.ts b/app/src/protyle/scroll/event.ts
index 78a7984d8e..dfaad0454e 100644
--- a/app/src/protyle/scroll/event.ts
+++ b/app/src/protyle/scroll/event.ts
@@ -7,10 +7,10 @@ import {updateHotkeyTip} from "../util/compatibility";
export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
let elementRect = element.getBoundingClientRect();
- element.addEventListener("scroll", (event) => {
+ element.addEventListener("scroll", () => {
if (!protyle.toolbar.element.classList.contains("fn__none")) {
const initY = protyle.toolbar.element.getAttribute("data-inity").split(Constants.ZWSP);
- const top = parseInt(initY[0]) + (parseInt(initY[1]) - element.scrollTop)
+ const top = parseInt(initY[0]) + (parseInt(initY[1]) - element.scrollTop);
if (elementRect.width === 0) {
elementRect = element.getBoundingClientRect();
}
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index 43e4f3ea60..4194cc9727 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -115,7 +115,7 @@ export class Toolbar {
}
const rangePosition = getSelectionPosition(nodeElement, range);
this.element.classList.remove("fn__none");
- const y = rangePosition.top - this.toolbarHeight - 4
+ const y = rangePosition.top - this.toolbarHeight - 4;
this.element.setAttribute("data-inity", y + Constants.ZWSP + protyle.contentElement.scrollTop.toString());
setPosition(this.element, rangePosition.left - 52, y);
this.element.querySelectorAll(".protyle-toolbar__item--current").forEach(item => {
diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts
index 5469216f8a..163ccb2899 100644
--- a/app/src/protyle/util/insertHTML.ts
+++ b/app/src/protyle/util/insertHTML.ts
@@ -141,7 +141,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false) =>
tempElement.innerHTML = `<div${subType === "o" ? " data-marker=\"1.\"" : ""} data-subtype="${subType}" data-node-id="${Lute.NewNodeID()}" data-type="NodeList" class="list">${html}<div class="protyle-attr" contenteditable="false">${Constants.ZWSP}</div></div>`;
}
}
- let lastElement: Element
+ let lastElement: Element;
Array.from(tempElement.content.children).reverse().forEach((item) => {
const addId = item.getAttribute("data-node-id");
if (addId === id) {
@@ -192,7 +192,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false) =>
// https://github.com/siyuan-note/siyuan/issues/5591
focusBlock(lastElement, undefined, false);
}
- const wbrElement = protyle.wysiwyg.element.querySelector("wbr")
+ const wbrElement = protyle.wysiwyg.element.querySelector("wbr");
if (wbrElement) {
wbrElement.remove();
}