Skip to content

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

:rotating_light:

Vanessa8c19d179469e
diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts
index b966498fdb..0dd6ecde2f 100644
--- a/app/src/config/bazaar.ts
+++ b/app/src/config/bazaar.ts
@@ -339,7 +339,7 @@ export const bazaar = {
highlightRender(mdElement);
});
}
- readmeElement.classList.add("config-bazaar__readme--show")
+ readmeElement.classList.add("config-bazaar__readme--show");
},
bindEvent() {
fetchPost("/api/bazaar/getBazaarTheme", {}, response => {
@@ -377,7 +377,7 @@ export const bazaar = {
event.stopPropagation();
break;
} else if (type === "goBack") {
- bazaar.element.querySelector("#configBazaarReadme").classList.remove("config-bazaar__readme--show")
+ bazaar.element.querySelector("#configBazaarReadme").classList.remove("config-bazaar__readme--show");
event.preventDefault();
event.stopPropagation();
break;
diff --git a/app/src/config/index.ts b/app/src/config/index.ts
index 0c46984444..7f55234249 100644
--- a/app/src/config/index.ts
+++ b/app/src/config/index.ts
@@ -79,7 +79,7 @@ export const genItemPanel = (type: string, containerElement:Element) => {
default:
break;
}
-}
+};
export const openSetting = () => {
const exitDialog = window.siyuan.dialogs.find((item) => {
diff --git a/app/src/config/search.ts b/app/src/config/search.ts
index d7e6c2ef03..c26acd0ae5 100644
--- a/app/src/config/search.ts
+++ b/app/src/config/search.ts
@@ -113,7 +113,7 @@ export const initConfigSearch = (element: HTMLElement) => {
return;
}
// 右侧面板过滤
- const panelElement = element.querySelector(`.config__tab-container[data-name="${type}"]`)
+ const panelElement = element.querySelector(`.config__tab-container[data-name="${type}"]`);
if (panelElement.innerHTML === "") {
genItemPanel(type, panelElement);
}
@@ -126,7 +126,7 @@ export const initConfigSearch = (element: HTMLElement) => {
} else {
panelElement.querySelectorAll(`.config__tab-container[data-name="${type}"] .b3-label`).forEach((itemElement: HTMLElement) => {
if (!itemElement.classList.contains("fn__none")) {
- const text = itemElement.textContent.toLowerCase()
+ const text = itemElement.textContent.toLowerCase();
if (text.indexOf(inputValue.toLowerCase()) > -1 || inputValue.toLowerCase().indexOf(text) > -1) {
itemElement.style.display = "";
} else {
diff --git a/app/src/index.ts b/app/src/index.ts
index cf21f757cf..dfdebb07f9 100644
--- a/app/src/index.ts
+++ b/app/src/index.ts
@@ -29,7 +29,7 @@ import {getLocalStorage} from "./protyle/util/compatibility";
import {updateEditModeElement} from "./layout/topBar";
import {getSearch} from "./util/functions";
import {hideAllElements} from "./protyle/ui/hideElements";
-import {initPluginSystem} from 'siyuan-petal';
+import {initPluginSystem} from "siyuan-petal";
class App {
constructor() {
diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts
index 00121d1921..70c3cf7871 100644
--- a/app/src/layout/dock/Outline.ts
+++ b/app/src/layout/dock/Outline.ts
@@ -176,7 +176,7 @@ export class Outline extends Model {
}
public updateDocTitle(ial?: IObject) {
- const docTitleElement = this.headerElement.nextElementSibling as HTMLElement
+ const docTitleElement = this.headerElement.nextElementSibling as HTMLElement;
if (this.type === "pin") {
if (ial) {
let iconHTML = `${unicode2Emoji(ial.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true)}`;
@@ -186,12 +186,12 @@ export class Outline extends Model {
docTitleElement.innerHTML = `${iconHTML}
<span class="b3-list-item__text">${escapeHtml(ial.title)}</span>`;
docTitleElement.setAttribute("title", ial.title);
- docTitleElement.classList.remove("fn__none")
+ docTitleElement.classList.remove("fn__none");
} else {
- docTitleElement.classList.add("fn__none")
+ docTitleElement.classList.add("fn__none");
}
} else {
- docTitleElement.classList.add("fn__none")
+ docTitleElement.classList.add("fn__none");
}
}
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index f1f0b7df79..1837564062 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -4,7 +4,6 @@ import {processPasteCode, processRender} from "./processCode";
import {writeText} from "./compatibility";
/// #if !BROWSER
import {clipboard} from "electron";
-import {getCurrentWindow} from "@electron/remote";
/// #endif
import {hasClosestBlock} from "./hasClosest";
import {focusByWbr, getEditorRange} from "./selection";
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index a8b6f3b2fb..f56c032428 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -10,19 +10,19 @@ import {showMessage} from "../dialog/message";
export const isSYProtocol = (url: string) => {
return /^siyuan:\/\/blocks\/\d{14}-\w{7}/.test(url);
-}
+};
export const getIdFromSYProtocol = (url: string) => {
return url.substring(16, 16 + 22);
-}
+};
/* redirect to auth page */
export const redirectToCheckAuth = (to: string = window.location.href) => {
const url = new URL(window.location.origin);
- url.pathname = '/check-auth';
- url.searchParams.set('to', to);
+ url.pathname = "/check-auth";
+ url.searchParams.set("to", to);
window.location.href = url.href;
-}
+};
export const addBaseURL = () => {
let baseURLElement = document.getElementById("baseURL");