Skip to content

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

:rotating_light:

Vanessae8ade79630d9
diff --git a/app/electron/main.js b/app/electron/main.js
index c1b2bcbffc..febb72e969 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -192,7 +192,7 @@ const boot = () => {
webviewTag: true,
webSecurity: false,
contextIsolation: false,
- autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
+ autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
},
frame: "darwin" === process.platform,
titleBarStyle: "hidden",
@@ -752,7 +752,7 @@ app.whenReady().then(() => {
nodeIntegration: true,
webviewTag: true,
webSecurity: false,
- autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
+ autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
},
});
win.loadURL(data.url);
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index 8608900cc7..017d5982fa 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -3,7 +3,6 @@ import {closePanel} from "./closePanel";
import {openMobileFileById} from "../editor";
import {validateName} from "../../editor/rename";
import {getEventName} from "../../protyle/util/compatibility";
-import {mountHelp} from "../../util/mount";
import {fetchPost} from "../../util/fetch";
import {setInlineStyle} from "../../util/assets";
import {renderSnippet} from "../../config/util/snippets";
diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.ts
index b2c186cd26..9ae35a9b04 100644
--- a/app/src/mobile/util/keyboardToolbar.ts
+++ b/app/src/mobile/util/keyboardToolbar.ts
@@ -250,7 +250,7 @@ export const initKeyboardToolbar = () => {
preventRender = true;
setTimeout(() => {
preventRender = false;
- }, 1000)
+ }, 1000);
return;
} else if (type === "goinline") {
const dynamicElements = document.querySelectorAll("#keyboardToolbar .keyboard__dynamic");
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index 1c13d91d6f..b3770bf24f 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -468,7 +468,7 @@ const renderPDF = (id: string) => {
nodeIntegration: true,
webviewTag: true,
webSecurity: false,
- autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
+ autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
},
});
ipcRenderer.send(Constants.SIYUAN_EXPORT_PREVENT, window.siyuan.printWin.id);
diff --git a/app/src/protyle/toolbar/util.ts b/app/src/protyle/toolbar/util.ts
index 69a2a54823..878c08fb27 100644
--- a/app/src/protyle/toolbar/util.ts
+++ b/app/src/protyle/toolbar/util.ts
@@ -16,24 +16,24 @@ export const previewTemplate = (pathString: string, element: Element, parentId:
const mergeElement = (a: Element, b: Element, after = true) => {
a.setAttribute("data-type", a.getAttribute("data-type").replace("search-mark", "").trim());
b.setAttribute("data-type", b.getAttribute("data-type").replace("search-mark", "").trim());
- const attributes = a.attributes
- let isMatch = true
+ const attributes = a.attributes;
+ let isMatch = true;
for (let i = 0; i < attributes.length; i++) {
if (b.getAttribute(attributes[i].name) !== attributes[i].value) {
- isMatch = false
+ isMatch = false;
}
}
if (isMatch) {
if (after) {
- a.innerHTML = a.innerHTML + b.innerHTML
+ a.innerHTML = a.innerHTML + b.innerHTML;
} else {
- a.innerHTML = b.innerHTML + a.innerHTML
+ a.innerHTML = b.innerHTML + a.innerHTML;
}
b.remove();
}
return isMatch;
-}
+};
export const removeSearchMark = (element: HTMLElement) => {
let previousElement = element.previousSibling as HTMLElement;
@@ -56,4 +56,4 @@ export const removeSearchMark = (element: HTMLElement) => {
if (element.getAttribute("data-type").includes("search-mark")) {
element.setAttribute("data-type", element.getAttribute("data-type").replace("search-mark", "").trim());
}
-}
+};
diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.ts
index d1c771de61..ff9d00f0d6 100644
--- a/app/src/protyle/wysiwyg/commonHotkey.ts
+++ b/app/src/protyle/wysiwyg/commonHotkey.ts
@@ -7,12 +7,10 @@ import {
getSelectionOffset,
setFirstNodeRange,
} from "../util/selection";
-import {fullscreen, netImg2LocalAssets} from "../breadcrumb/action";
-import {setPadding} from "../ui/initUI";
+import {netImg2LocalAssets} from "../breadcrumb/action";
/// #if !MOBILE
import {openBacklink, openGraph, openOutline} from "../../layout/dock/util";
/// #endif
-import {reloadProtyle} from "../util/reload";
import {getContenteditableElement, hasNextSibling, hasPreviousSibling} from "./getBlock";
import {hasClosestByMatchTag} from "../util/hasClosest";
import {hideElements} from "../ui/hideElements";
diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts
index e340726fe2..6b3dab8d87 100644
--- a/app/src/util/onGetConfig.ts
+++ b/app/src/util/onGetConfig.ts
@@ -12,7 +12,6 @@ import {Constants} from "../constants";
import {appearance} from "../config/appearance";
import {globalShortcut} from "./globalShortcut";
import {fetchPost} from "./fetch";
-import {mountHelp} from "./mount";
import {addGA, initAssets, setInlineStyle} from "./assets";
import {renderSnippet} from "../config/util/snippets";
import {openFileById} from "../editor/util";