Skip to content

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

:rotating_light:

Vanessab542a80f56eb
diff --git a/app/src/config/appearance.ts b/app/src/config/appearance.ts
index 3d64f75b24..d155a99fc3 100644
--- a/app/src/config/appearance.ts
+++ b/app/src/config/appearance.ts
@@ -6,7 +6,6 @@ import {Constants} from "../constants";
import {exportLayout, resetLayout} from "../layout/util";
import {isBrowser} from "../util/functions";
import {fetchPost} from "../util/fetch";
-import {loadAssets} from "../util/assets";
import {genOptions} from "../util/genOptions";
import {openSnippets} from "./util/snippets";
import {openColorPicker} from "./util/colorPicker";
diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts
index 54e9d17b9c..085b815689 100644
--- a/app/src/editor/util.ts
+++ b/app/src/editor/util.ts
@@ -200,7 +200,7 @@ const getUnInitTab = (options: IOpenFileOptions) => {
}
}
});
-}
+};
const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IModels) => {
allModels.editor.forEach((item) => {
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index 3ab2f07a0f..0b2959061b 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -428,7 +428,7 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => {
export const resizeDrag = () => {
const dragElement = document.getElementById("drag");
const width = dragElement.clientWidth;
- const dragRect = dragElement.getBoundingClientRect()
+ const dragRect = dragElement.getBoundingClientRect();
const left = dragRect.left;
const right = window.innerWidth - dragRect.right;
if (left > right && left - right < width) {
diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts
index 1efb1aa318..c826972e27 100644
--- a/app/src/protyle/export/util.ts
+++ b/app/src/protyle/export/util.ts
@@ -58,8 +58,8 @@ export const exportImage = (id: string) => {
}
});
previewElement.querySelectorAll(".li > .protyle-action > svg").forEach(item => {
- const id = item.firstElementChild.getAttribute("xlink:href")
- const symbolElements = document.querySelectorAll(id)
+ const id = item.firstElementChild.getAttribute("xlink:href");
+ const symbolElements = document.querySelectorAll(id);
let viewBox = "0 0 32 32";
if (id === "#iconDot") {
viewBox = "0 0 20 20";
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 5256796250..38886541b5 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -3,7 +3,7 @@ import {getIconByType} from "../../editor/getIcon";
import {iframeMenu, setFold, tableMenu, videoMenu, zoomOut} from "../../menus/protyle";
import {MenuItem} from "../../menus/Menu";
import {copySubMenu, openAttr, openWechatNotify} from "../../menus/commonMenuItem";
-import {isCtrl, updateHotkeyTip, writeText} from "../util/compatibility";
+import {updateHotkeyTip, writeText} from "../util/compatibility";
import {
transaction,
turnsIntoOneTransaction, turnsIntoTransaction,
diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.ts
index ca976d71c9..3b7da3835b 100644
--- a/app/src/protyle/util/reload.ts
+++ b/app/src/protyle/util/reload.ts
@@ -18,9 +18,9 @@ export const reloadProtyle = (protyle: IProtyle) => {
addLoading(protyle);
if (protyle.options.backlinkData) {
const isMention = protyle.element.getAttribute("data-ismention") === "true";
- const tabElement = hasClosestByClassName(protyle.element, "sy__backlink")
+ const tabElement = hasClosestByClassName(protyle.element, "sy__backlink");
if (tabElement) {
- const inputsElement = tabElement.querySelectorAll(".b3-form__icon-input") as NodeListOf<HTMLInputElement>
+ const inputsElement = tabElement.querySelectorAll(".b3-form__icon-input") as NodeListOf<HTMLInputElement>;
fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", {
defID: protyle.element.getAttribute("data-defid"),
refTreeID: protyle.block.rootID,
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index 71ce52a4a3..53633bc25c 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -361,8 +361,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (previousElement) {
previousElement.setAttribute("select-end", "true");
if (previousElement.getBoundingClientRect().top <= protyle.contentElement.getBoundingClientRect().top) {
- preventScroll(protyle)
- previousElement.scrollIntoView(true)
+ preventScroll(protyle);
+ previousElement.scrollIntoView(true);
}
}
}
@@ -398,8 +398,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
if (nextElement) {
nextElement.setAttribute("select-end", "true");
if (nextElement.getBoundingClientRect().bottom >= protyle.contentElement.getBoundingClientRect().bottom) {
- preventScroll(protyle)
- nextElement.scrollIntoView(false)
+ preventScroll(protyle);
+ nextElement.scrollIntoView(false);
}
}
}
diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts
index c206b5dc73..97526f4790 100644
--- a/app/src/util/assets.ts
+++ b/app/src/util/assets.ts
@@ -251,7 +251,7 @@ const watchTheme = (data: { init: boolean, OSTheme: string }) => {
if ((window.siyuan.config.system.container === "ios" && window.webkit?.messageHandlers) ||
(window.siyuan.config.system.container === "android" && window.JSAndroid)) {
setTimeout(() => {
- const backgroundColor = getComputedStyle(document.body).getPropertyValue("--b3-theme-background")
+ const backgroundColor = getComputedStyle(document.body).getPropertyValue("--b3-theme-background");
let mode = window.siyuan.config.appearance.mode;
if (window.siyuan.config.appearance.modeOS) {
if (data.OSTheme === "dark") {
@@ -304,4 +304,4 @@ const watchTheme = (data: { init: boolean, OSTheme: string }) => {
window.siyuan.config.appearance = response.data.appearance;
loadAssets(response.data.appearance);
});
-}
+};