Skip to content

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

:rotating_light:

Vanessa6a37b8661304
diff --git a/app/src/boot/globalEvent/keydown.ts b/app/src/boot/globalEvent/keydown.ts
index 9f345230e5..069c55bbb3 100644
--- a/app/src/boot/globalEvent/keydown.ts
+++ b/app/src/boot/globalEvent/keydown.ts
@@ -429,13 +429,13 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.quickMakeCard.custom, event)) {
- const blockIDs: string[] = []
+ const blockIDs: string[] = [];
liElements.forEach(item => {
- const id = item.getAttribute("data-node-id")
+ const id = item.getAttribute("data-node-id");
if (id) {
- blockIDs.push(id)
+ blockIDs.push(id);
}
- })
+ });
if (blockIDs.length > 0) {
transaction(undefined, [{
action: "addFlashcards",
diff --git a/app/src/menus/navigation.ts b/app/src/menus/navigation.ts
index 3809033fc6..903e5791dd 100644
--- a/app/src/menus/navigation.ts
+++ b/app/src/menus/navigation.ts
@@ -50,13 +50,13 @@ const initMultiMenu = (selectItemElements: NodeListOf<Element>, app: App) => {
}
}).element);
- const blockIDs: string[] = []
+ const blockIDs: string[] = [];
selectItemElements.forEach(item => {
- const id = item.getAttribute("data-node-id")
+ const id = item.getAttribute("data-node-id");
if (id) {
- blockIDs.push(id)
+ blockIDs.push(id);
}
- })
+ });
if (blockIDs.length === 0) {
return window.siyuan.menus.menu;
}
diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts
index 2088b2ffaf..de901758d0 100644
--- a/app/src/protyle/header/Title.ts
+++ b/app/src/protyle/header/Title.ts
@@ -25,7 +25,6 @@ import {code160to32} from "../util/code160to32";
import {genEmptyElement} from "../../block/util";
import {transaction} from "../wysiwyg/transaction";
import {hideTooltip} from "../../dialog/tooltip";
-import {quickMakeCard} from "../../card/makeCard";
import {commonClick} from "../wysiwyg/commonClick";
import {openTitleMenu} from "./openTitleMenu";
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index a54b2f0cb3..cd9f743ca0 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -33,7 +33,6 @@ import {isMobile} from "../../util/functions";
import {isCtrl, isIPhone} from "../util/compatibility";
import {avRender} from "../render/av/render";
import {genIconHTML} from "../render/util";
-import {insertAttrViewBlockAnimation} from "../render/av/action";
export class Hint {
public timeId: number;
@@ -415,7 +414,7 @@ ${genHintItemHTML(item)}
if (!cellElement) {
return;
}
- const previousID = cellElement.dataset.blockId
+ const previousID = cellElement.dataset.blockId;
const avID = nodeElement.getAttribute("data-av-id");
let tempElement = document.createElement("div");
tempElement.innerHTML = value.replace(/<mark>/g, "").replace(/<\/mark>/g, "");
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 090d02a479..a9c19d14d8 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -400,7 +400,7 @@ const updateCellValue = (protyle: IProtyle, type: TAVCol, cellElements: HTMLElem
if (!document.contains(cellElements[0]) && cellElements.length === 1 && cellElements[0].dataset.detached === "true") {
// 新增行后弹出的输入框进行修改后,原始 cell 已被更新
const avid = cellElements[0].parentElement.dataset.avid;
- cellElements[0] = protyle.wysiwyg.element.querySelector(`[data-av-id="${avid}"] .av__row--add`).previousElementSibling.querySelector('[data-detached="true"]')
+ cellElements[0] = protyle.wysiwyg.element.querySelector(`[data-av-id="${avid}"] .av__row--add`).previousElementSibling.querySelector('[data-detached="true"]');
}
if (cellElements.length === 1 && cellElements[0].dataset.detached === "true" && !cellElements[0].parentElement.dataset.id) {
return;
diff --git a/app/src/search/assets.ts b/app/src/search/assets.ts
index d6b1a3a794..468b71cbb1 100644
--- a/app/src/search/assets.ts
+++ b/app/src/search/assets.ts
@@ -194,7 +194,7 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {
renderPreview(previewElement, currentList.dataset.id, searchInputElement.value, localSearch.method);
} else if (Constants.KEYCODELIST[event.keyCode] === "PageUp") {
if (!element.querySelector('[data-type="assetPrevious"]').getAttribute("disabled")) {
- let currentPage = parseInt(element.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0])
+ let currentPage = parseInt(element.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0]);
if (currentPage > 1) {
currentPage--;
assetInputEvent(element, localSearch, currentPage);
@@ -203,7 +203,7 @@ export const openSearchAsset = (element: Element, isStick: boolean) => {
event.preventDefault();
} else if (Constants.KEYCODELIST[event.keyCode] === "PageDown") {
if (!element.querySelector('[data-type="assetNext"]').getAttribute("disabled")) {
- let currentPage = parseInt(element.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0])
+ let currentPage = parseInt(element.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0]);
if (currentPage < parseInt(element.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[1])) {
currentPage++;
assetInputEvent(element, localSearch, currentPage);
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index 631f52ffc4..95434c2c91 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -649,7 +649,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
break;
} else if (type === "assetPrevious") {
if (!target.getAttribute("disabled")) {
- let currentPage = parseInt(assetsElement.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0])
+ let currentPage = parseInt(assetsElement.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0]);
if (currentPage > 1) {
currentPage--;
assetInputEvent(assetsElement, localSearch, currentPage);
@@ -660,7 +660,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
break;
} else if (type === "assetNext") {
if (!target.getAttribute("disabled")) {
- let currentPage = parseInt(assetsElement.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0])
+ let currentPage = parseInt(assetsElement.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[0]);
if (currentPage < parseInt(assetsElement.querySelector("#searchAssetResult .fn__flex-center").textContent.split("/")[1])) {
currentPage++;
assetInputEvent(assetsElement, localSearch, currentPage);