Skip to content

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

:rotating_light:

Vanessa4ede229dd079
diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts
index 99fa6e2f94..29b91b49be 100644
--- a/app/src/editor/util.ts
+++ b/app/src/editor/util.ts
@@ -102,14 +102,14 @@ const openFile = (options: IOpenFileOptions) => {
if (initData) {
const initObj = JSON.parse(initData);
if (initObj.rootId === options.rootID || initObj.blockId === options.rootID) {
- initObj.blockId = options.id
- initObj.mode = options.mode
+ initObj.blockId = options.id;
+ initObj.mode = options.mode;
if (options.zoomIn) {
- initObj.action = [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS]
+ initObj.action = [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS];
} else {
- initObj.action = options.action
+ initObj.action = options.action;
}
- delete initObj.scrollAttr
+ delete initObj.scrollAttr;
item.headElement.setAttribute("data-initdata", JSON.stringify(initObj));
item.parent.switchTab(item.headElement);
return true;
diff --git a/app/src/menus/tab.ts b/app/src/menus/tab.ts
index 7a69011338..66f9e71a2b 100644
--- a/app/src/menus/tab.ts
+++ b/app/src/menus/tab.ts
@@ -163,12 +163,12 @@ export const initTabMenu = (tab: Tab) => {
const model = tab.model;
let rootId;
if ((model && model instanceof Editor)) {
- rootId = model.editor.protyle.block.rootID
+ rootId = model.editor.protyle.block.rootID;
} else {
- const initData = tab.headElement.getAttribute("data-initdata")
+ const initData = tab.headElement.getAttribute("data-initdata");
if (initData) {
const initDataObj = JSON.parse(initData);
- rootId = initDataObj.rootId || initDataObj.blockId
+ rootId = initDataObj.rootId || initDataObj.blockId;
}
}
if (rootId) {
diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts
index d3c59985cb..fb5cf9de9b 100644
--- a/app/src/protyle/util/onGet.ts
+++ b/app/src/protyle/util/onGet.ts
@@ -120,7 +120,7 @@ export const onGet = (data: IWebSocketData, protyle: IProtyle, action: string[]
if (scrollObj && protyle.options.mode !== "preview") {
restoreScroll(protyle, scrollObj);
}
- removeLoading(protyle)
+ removeLoading(protyle);
});
};
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 21581ca787..00c6d00a48 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -1068,7 +1068,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
protyle,
nodeElement,
type: "Blocks2Ps",
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1079,7 +1079,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
nodeElement,
type: "Blocks2Hs",
level: 1
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1090,7 +1090,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
nodeElement,
type: "Blocks2Hs",
level: 2
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1101,7 +1101,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
nodeElement,
type: "Blocks2Hs",
level: 3
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1112,7 +1112,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
nodeElement,
type: "Blocks2Hs",
level: 4
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1123,7 +1123,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
nodeElement,
type: "Blocks2Hs",
level: 5
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1134,7 +1134,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
nodeElement,
type: "Blocks2Hs",
level: 6
- })
+ });
event.preventDefault();
event.stopPropagation();
return true;
@@ -1482,7 +1482,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
const selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
let html = "";
if (selectsElement.length === 0) {
- selectsElement.push(nodeElement)
+ selectsElement.push(nodeElement);
}
selectsElement.forEach(item => {
item.querySelectorAll('[contenteditable="true"]').forEach(editItem => {
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 4b0bb4bfa5..934d3d03af 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -1,6 +1,6 @@
-import {fetchPost, fetchSyncPost} from "../../util/fetch";
+import {fetchPost} from "../../util/fetch";
import {focusBlock, focusByRange, focusByWbr, focusSideBlock, getEditorRange} from "../util/selection";
-import {getContenteditableElement, getTopAloneElement} from "./getBlock";
+import {getTopAloneElement} from "./getBlock";
import {Constants} from "../../constants";
import {blockRender} from "../markdown/blockRender";
import {processRender} from "../util/processCode";