Skip to content

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

:rotating_light:

Vanessa21f1f48a5029
diff --git a/app/src/menus/toolbar.ts b/app/src/menus/toolbar.ts
index 2bdeda996b..fb8791b7e8 100644
--- a/app/src/menus/toolbar.ts
+++ b/app/src/menus/toolbar.ts
@@ -56,7 +56,7 @@ export const initToolbarMore = () => {
fetchPost("/api/system/logoutAuth", {}, () => {
exportLayout(false, () => {
window.location.href = "/";
- })
+ });
});
}
}).element);
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts
index f8727725fe..785269ed2c 100644
--- a/app/src/protyle/toolbar/index.ts
+++ b/app/src/protyle/toolbar/index.ts
@@ -78,14 +78,14 @@ export class Toolbar {
Array.from(range.cloneContents().childNodes).find(item => {
if (item.nodeType !== 1) {
if (item.textContent.length > 0) {
- noText = false
- return true
+ noText = false;
+ return true;
}
} else if (!(item as HTMLElement).classList.contains("img")) {
- hasImg = false
- return true
+ hasImg = false;
+ return true;
}
- })
+ });
if (hasImg && noText) {
this.element.classList.add("fn__none");
return;
diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.ts
index 0c593e8af9..2d33034a42 100644
--- a/app/src/protyle/util/selection.ts
+++ b/app/src/protyle/util/selection.ts
@@ -40,31 +40,31 @@ export const selectAll = (protyle: IProtyle, nodeElement: Element, range: Range)
range.setStart(firstChild, 0);
break;
}
- firstChild = firstChild.nextSibling
+ firstChild = firstChild.nextSibling;
} else {
if ((firstChild as HTMLElement).classList.contains("render-node") ||
(firstChild as HTMLElement).classList.contains("img")) {
range.setStartBefore(firstChild);
break;
}
- firstChild = firstChild.firstChild
+ firstChild = firstChild.firstChild;
}
}
- let lastChild = editElement.lastChild
+ let lastChild = editElement.lastChild;
while (lastChild) {
if (lastChild.nodeType === 3) {
if (lastChild.textContent !== "") {
range.setEnd(lastChild, lastChild.textContent.length);
break;
}
- lastChild = lastChild.previousSibling
+ lastChild = lastChild.previousSibling;
} else {
if ((lastChild as HTMLElement).classList.contains("render-node") ||
(lastChild as HTMLElement).classList.contains("img")) {
range.setEndAfter(lastChild);
break;
}
- lastChild = lastChild.lastChild
+ lastChild = lastChild.lastChild;
}
}
protyle.toolbar.render(protyle, range);
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts
index 6b0aaedf5f..0dc79b66fb 100644
--- a/app/src/util/globalShortcut.ts
+++ b/app/src/util/globalShortcut.ts
@@ -250,7 +250,7 @@ export const globalShortcut = () => {
fetchPost("/api/system/logoutAuth", {}, () => {
exportLayout(false, () => {
window.location.href = "/";
- })
+ });
});
event.preventDefault();
return;