Skip to content

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

:rotating_light:

Vanessa52e1cc795753
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts
index 0b2b282c3f..e241105445 100644
--- a/app/src/layout/Wnd.ts
+++ b/app/src/layout/Wnd.ts
@@ -801,7 +801,7 @@ export class Wnd {
}
tab.parent = this;
resizeTabs();
- hideAllElements(["toolbar"])
+ hideAllElements(["toolbar"]);
}
public split(direction: TDirection) {
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index de08300f9d..b2779b5fc3 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -430,7 +430,7 @@ export class Files extends Model {
}
}
if (gutterType && newElement.classList.contains("dragover")) {
- const gutterTypes = gutterType.replace(Constants.SIYUAN_DROP_GUTTER, "").split(Constants.ZWSP)
+ const gutterTypes = gutterType.replace(Constants.SIYUAN_DROP_GUTTER, "").split(Constants.ZWSP);
if (["nodelistitem", "nodeheading"].includes(gutterTypes[0])) {
// 块标拖拽
if (gutterTypes[0] === "nodeheading") {
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index 9c40f4ceca..c7ca2256cb 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -30,19 +30,19 @@ export class Dock {
this.layout = window.siyuan.layout.layout.children[0].children[0] as Layout;
this.resizeElement = this.layout.element.nextElementSibling as HTMLElement;
this.layout.element.classList.add("layout__dockl");
- this.layout.element.insertAdjacentHTML("beforeend", `<div class="layout__dockresize layout__dockresize--lr"></div>`);
+ this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize layout__dockresize--lr\"></div>");
break;
case "Right":
this.layout = window.siyuan.layout.layout.children[0].children[2] as Layout;
this.resizeElement = this.layout.element.previousElementSibling as HTMLElement;
this.layout.element.classList.add("layout__dockr");
- this.layout.element.insertAdjacentHTML("beforeend", `<div class="layout__dockresize layout__dockresize--lr"></div>`);
+ this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize layout__dockresize--lr\"></div>");
break;
case "Bottom":
this.layout = window.siyuan.layout.layout.children[1] as Layout;
this.resizeElement = this.layout.element.previousElementSibling as HTMLElement;
this.layout.element.classList.add("layout__dockb");
- this.layout.element.insertAdjacentHTML("beforeend", `<div class="layout__dockresize"></div>`);
+ this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize\"></div>");
break;
}
this.element = document.getElementById("dock" + options.position);
@@ -121,7 +121,7 @@ export class Dock {
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
moveEvent.preventDefault();
moveEvent.stopPropagation();
- let currentNowSize
+ let currentNowSize;
if (this.position === "Left") {
currentNowSize = (currentSize + (moveEvent.clientX - x));
} else if (this.position === "Right") {
@@ -424,7 +424,7 @@ export class Dock {
if (anotherIndex === 0) {
anotherWnd.element.nextElementSibling.classList.remove("fn__none");
} else {
- lastWnd = anotherWnd
+ lastWnd = anotherWnd;
anotherWnd.element.previousElementSibling.classList.remove("fn__none");
}
const lastActiveElement = this.element.querySelector('.dock__item--active[data-index="1"]');
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index ed9b69bbf4..e1d89fbfc1 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -509,7 +509,7 @@ export const resizeTabs = () => {
});
});
pdfResize();
- hideAllElements(["gutter"])
+ hideAllElements(["gutter"]);
}, 200);
};
diff --git a/app/src/protyle/ui/hideElements.ts b/app/src/protyle/ui/hideElements.ts
index 0b5efb1731..2a1dbd67c9 100644
--- a/app/src/protyle/ui/hideElements.ts
+++ b/app/src/protyle/ui/hideElements.ts
@@ -63,4 +63,4 @@ export const hideAllElements = (types: string[]) => {
item.innerHTML = "";
});
}
-}
+};
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index 641e7951b4..0ccced5442 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -813,7 +813,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
const ids = event.dataTransfer.getData(Constants.SIYUAN_DROP_FILE).split(",");
for (let i = 0; i < ids.length; i++) {
if (ids[i]) {
- const response = await fetchSyncPost("/api/filetree/doc2Heading", {
+ await fetchSyncPost("/api/filetree/doc2Heading", {
srcID: ids[i],
after: targetElement.classList.contains("dragover__bottom"),
targetID: targetElement.getAttribute("data-node-id"),
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts
index 22469b1e37..ae0e1fce78 100644
--- a/app/src/util/globalShortcut.ts
+++ b/app/src/util/globalShortcut.ts
@@ -825,10 +825,10 @@ export const globalShortcut = () => {
}
// protyle.toolbar 点击空白处时进行隐藏
if (!hasClosestByClassName(event.target, "protyle-toolbar")) {
- hideAllElements(["toolbar"])
+ hideAllElements(["toolbar"]);
}
if (!hasClosestByClassName(event.target, "pdf__outer")) {
- hideAllElements(["pdfutil"])
+ hideAllElements(["pdfutil"]);
}
// dock float 时,点击空白处,隐藏 dock
const floatDockLayoutElement = hasClosestByClassName(event.target, "layout--float", true);