Skip to content

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

:rotating_light:

Vanessa235f8f8a6a39
diff --git a/app/src/config/editor.ts b/app/src/config/editor.ts
index bbc702d49b..330639e5d0 100644
--- a/app/src/config/editor.ts
+++ b/app/src/config/editor.ts
@@ -16,11 +16,11 @@ export const editor = {
}
window.siyuan.config.editor.readOnly = readOnly;
if (readOnly) {
- target.classList.add("toolbar__item--active")
+ target.classList.add("toolbar__item--active");
target.setAttribute("aria-label", `${window.siyuan.languages.use} ${window.siyuan.languages.editMode} ${updateHotkeyTip(window.siyuan.config.keymap.general.editMode.custom)}`);
target.querySelector("use").setAttribute("xlink:href", "#iconPreview");
} else {
- target.classList.remove("toolbar__item--active")
+ target.classList.remove("toolbar__item--active");
target.setAttribute("aria-label", `${window.siyuan.languages.use} ${window.siyuan.languages.editReadonly} ${updateHotkeyTip(window.siyuan.config.keymap.general.editMode.custom)}`);
target.querySelector("use").setAttribute("xlink:href", "#iconEdit");
}
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index a0715fc1de..5e50ee6b2f 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -272,7 +272,7 @@ export const bootSync = () => {
});
};
-export const setTitle = (title: string, protyle?: IProtyle) => {
+export const setTitle = (title: string) => {
const dragElement = document.getElementById("drag");
const workspaceName = getWorkspaceName();
if (title === window.siyuan.languages.siyuanNote) {
diff --git a/app/src/layout/dock/util.ts b/app/src/layout/dock/util.ts
index b948d3bda4..5e2e2e9374 100644
--- a/app/src/layout/dock/util.ts
+++ b/app/src/layout/dock/util.ts
@@ -4,8 +4,6 @@ import {Graph} from "./Graph";
import {Outline} from "./Outline";
import {switchWnd} from "../util";
import {Backlink} from "./Backlink";
-import {Dialog} from "../../dialog";
-import {fetchPost} from "../../util/fetch";
export const openBacklink = (protyle: IProtyle) => {
const backlink = getAllModels().backlink.find(item => {
diff --git a/app/src/layout/status.ts b/app/src/layout/status.ts
index 25423a827d..071d5a2b69 100644
--- a/app/src/layout/status.ts
+++ b/app/src/layout/status.ts
@@ -9,7 +9,6 @@ import {mountHelp} from "../util/mount";
import {getCurrentWindow} from "@electron/remote";
/// #endif
/// #endif
-import {isBrowser} from "../util/functions";
import {MenuItem} from "../menus/Menu";
export const initStatus = () => {
@@ -117,7 +116,7 @@ export const initStatus = () => {
window.open("https://github.com/siyuan-note/siyuan");
}
}).element);
- const rect = target.getBoundingClientRect()
+ const rect = target.getBoundingClientRect();
window.siyuan.menus.menu.popup({x: rect.right, y: rect.bottom, h: rect.height}, true);
event.stopPropagation();
break;
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts
index aafed449dd..65ba82f142 100644
--- a/app/src/layout/util.ts
+++ b/app/src/layout/util.ts
@@ -299,7 +299,7 @@ export const JSONToLayout = (isStart: boolean) => {
});
}
// https://github.com/siyuan-note/siyuan/pull/7086
- const openId = getSearch("id", window.location.href)
+ const openId = getSearch("id", window.location.href);
if (openId) {
openFileById({
id: getSearch("id", window.location.href),
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index d9ffe5e7c9..93429d4183 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -466,13 +466,13 @@ export const zoomOut = (protyle: IProtyle, id: string, focusId?: string, isPushB
pushBack();
}
} else {
- const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')
+ const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]');
if (id === protyle.block.rootID) {
- exitFocusElement.classList.add("fn__none")
- exitFocusElement.nextElementSibling.classList.add("fn__none")
+ exitFocusElement.classList.add("fn__none");
+ exitFocusElement.nextElementSibling.classList.add("fn__none");
} else {
- exitFocusElement.classList.remove("fn__none")
- exitFocusElement.nextElementSibling.classList.remove("fn__none")
+ exitFocusElement.classList.remove("fn__none");
+ exitFocusElement.nextElementSibling.classList.remove("fn__none");
}
}
fetchPost("/api/filetree/getDoc", {
diff --git a/app/src/mobile/util/initFramework.ts b/app/src/mobile/util/initFramework.ts
index 930a049bb9..927d43aa42 100644
--- a/app/src/mobile/util/initFramework.ts
+++ b/app/src/mobile/util/initFramework.ts
@@ -19,7 +19,6 @@ import {MobileBookmarks} from "./MobileBookmarks";
import {MobileTags} from "./MobileTags";
import {hideKeyboardToolbar, initKeyboardToolbar} from "./showKeyboardToolbar";
import {getSearch} from "../../util/functions";
-import {openFileById} from "../../editor/util";
export const initFramework = () => {
setInlineStyle();
diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts
index 34c92cef8d..e503fa42ba 100644
--- a/app/src/protyle/breadcrumb/index.ts
+++ b/app/src/protyle/breadcrumb/index.ts
@@ -35,7 +35,7 @@ export class Breadcrumb {
constructor(protyle: IProtyle) {
const element = document.createElement("div");
element.className = "protyle-breadcrumb";
- const isFocus = protyle.options.action.includes(Constants.CB_GET_ALL)
+ const isFocus = protyle.options.action.includes(Constants.CB_GET_ALL);
let html = `<div class="protyle-breadcrumb__bar"></div>
<span class="protyle-breadcrumb__space"></span>
<button class="block__icon block__icon--show ft__smaller fn__flex-center${isFocus ? "" : " fn__none"}" style="line-height: 14px" data-type="exit-focus">${window.siyuan.languages.exitFocus}</button>
@@ -71,7 +71,7 @@ export class Breadcrumb {
} else if (target.getAttribute("data-type") === "exit-focus") {
zoomOut(protyle, protyle.block.rootID);
event.preventDefault();
- break
+ break;
} else if (target.getAttribute("data-type") === "context") {
if (target.classList.contains("block__icon--active")) {
fetchPost("/api/filetree/getDoc", {
diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts
index caaef1b192..1b96048d34 100644
--- a/app/src/util/onGetConfig.ts
+++ b/app/src/util/onGetConfig.ts
@@ -1,5 +1,5 @@
import {openSearch} from "../search/spread";
-import {exportLayout, getInstanceById, JSONToLayout, resetLayout, resizeDrag, resizeTabs} from "../layout/util";
+import {exportLayout, JSONToLayout, resetLayout, resizeDrag, resizeTabs} from "../layout/util";
import {hotKey2Electron, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
/// #if !BROWSER
import {dialog, getCurrentWindow} from "@electron/remote";
@@ -28,9 +28,6 @@ import {editor} from "../config/editor";
import {goBack, goForward} from "./backForward";
import {replaceLocalPath} from "../editor/rename";
import {workspaceMenu} from "../menus/workspace";
-import {Tab} from "../layout/Tab";
-import {Editor} from "../editor";
-import {zoomOut} from "../menus/protyle";
import { getWorkspaceName } from "./noRelyPCFunction";
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {