Skip to content

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

:rotating_light:

Vanessaf89d16c3a202
diff --git a/app/src/menus/util.ts b/app/src/menus/util.ts
index 1c572cbaae..5eb7e0dee2 100644
--- a/app/src/menus/util.ts
+++ b/app/src/menus/util.ts
@@ -16,10 +16,10 @@ export const exportAsset = (src: string) => {
properties: ["showOverwriteConfirmation"],
}).then((result: SaveDialogReturnValue) => {
if (!result.canceled) {
- fetchPost("/api/file/copyFile", {src, dest: result.filePath})
+ fetchPost("/api/file/copyFile", {src, dest: result.filePath});
}
});
}
- }
+ };
/// #endif
-}
+};
diff --git a/app/src/mobile/util/MobileBackFoward.ts b/app/src/mobile/util/MobileBackFoward.ts
index 87bdec0b24..5dafcdfca2 100644
--- a/app/src/mobile/util/MobileBackFoward.ts
+++ b/app/src/mobile/util/MobileBackFoward.ts
@@ -69,7 +69,7 @@ const focusStack = (backStack: IBackStack) => {
protyle.contentElement.scrollTop = backStack.scrollTop;
window.siyuan.mobileEditor.protyle.breadcrumb.render(protyle);
});
-}
+};
export const pushBack = () => {
const protyle = window.siyuan.mobileEditor.protyle;
@@ -80,7 +80,7 @@ export const pushBack = () => {
callback: protyle.block.action,
isZoom: protyle.block.showAll
});
-}
+};
export const goForward = () => {
if (window.JSAndroid && forwardStack.length < 2) {
@@ -90,9 +90,9 @@ export const goForward = () => {
if (forwardStack.length < 2) {
return;
}
- window.siyuan.backStack.push(forwardStack.pop())
- focusStack(forwardStack[forwardStack.length - 1])
-}
+ window.siyuan.backStack.push(forwardStack.pop());
+ focusStack(forwardStack[forwardStack.length - 1]);
+};
export const goBack = () => {
if (window.JSAndroid && window.siyuan.backStack.length < 1) {
@@ -114,5 +114,5 @@ export const goBack = () => {
}
const item = window.siyuan.backStack.pop();
forwardStack.push(item);
- focusStack(item)
+ focusStack(item);
};
diff --git a/app/src/protyle/preview/index.ts b/app/src/protyle/preview/index.ts
index 9af7f2ac63..73a335f925 100644
--- a/app/src/protyle/preview/index.ts
+++ b/app/src/protyle/preview/index.ts
@@ -42,7 +42,7 @@ export class Preview {
// 对于超链接锚点不做任何处理
event.stopPropagation();
event.preventDefault();
- return
+ return;
}
if (isMobile()) {
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index b8822ee01c..28e7bea476 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -695,12 +695,12 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
// 外部文件拖入编辑器中或者编辑器内选中文字拖拽
focusByRange(document.caretRangeFromPoint(event.clientX, event.clientY));
if (event.dataTransfer.types[0] === "Files") {
- const files:string[] = []
- let isAllFile = true
+ const files:string[] = [];
+ let isAllFile = true;
for (let i = 0; i < event.dataTransfer.files.length; i++) {
files.push(event.dataTransfer.files[i].path);
if (event.dataTransfer.files[i].type === "") {
- isAllFile = false
+ isAllFile = false;
}
}
if (isAllFile) {
@@ -708,18 +708,18 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
window.siyuan.menus.menu.append(new MenuItem({
label:window.siyuan.languages.upload,
icon:"iconUpload",
- click(element) {
+ click() {
uploadLocalFiles(files, protyle);
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({
label:window.siyuan.languages.link,
icon:"iconLink",
- click(element) {
- let fileText = ""
+ click() {
+ let fileText = "";
files.forEach((item) => {
- fileText = `[${pathPosix().basename(item)}](${item})\n`
- })
+ fileText = `[${pathPosix().basename(item)}](${item})\n`;
+ });
insertHTML(protyle.lute.SpinBlockDOM(fileText), protyle);
}
}).element);
diff --git a/app/src/sync/syncGuide.ts b/app/src/sync/syncGuide.ts
index 43dd3ac537..aa421f31ab 100644
--- a/app/src/sync/syncGuide.ts
+++ b/app/src/sync/syncGuide.ts
@@ -218,7 +218,7 @@ const setKey = () => {
dialog.element.querySelector(".b3-button--cancel").addEventListener("click", () => {
dialog.destroy();
});
- const inputElement = dialog.element.querySelector(".b3-text-field") as HTMLInputElement
+ const inputElement = dialog.element.querySelector(".b3-text-field") as HTMLInputElement;
dialog.element.querySelector("#initKeyByPW").addEventListener("click", () => {
if (!inputElement.value) {
showMessage(window.siyuan.languages._kernel[142]);