An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: fix https://github.com/siyuan-note/siyuan/issues/5405
Vanessa8a36f3a110f8
diff --git a/app/src/block/util.ts b/app/src/block/util.tsindex e5dffb6cf3..904151b187 100644--- a/app/src/block/util.ts+++ b/app/src/block/util.ts@@ -73,6 +73,9 @@ export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id} else {blockElement = selectElements[selectElements.length - 1];}+ selectElements.forEach(item => {+ item.classList.remove("protyle-wysiwyg--select");+ });} else {blockElement = hasClosestBlock(range.startContainer) as HTMLElement;blockElement = getTopAloneElement(blockElement);diff --git a/app/src/config/repos.ts b/app/src/config/repos.tsindex 09c95c4710..3a52b9b434 100644--- a/app/src/config/repos.ts+++ b/app/src/config/repos.ts@@ -240,27 +240,10 @@ export const repos = {});break;case "selectCloud":- if (target.parentElement.getAttribute("disabled") !== "disabled") {- target.parentElement.setAttribute("disabled", "disabled");- fetchPost("/api/sync/getSyncDirection", {name: target.getAttribute("data-name")}, (response) => {- target.parentElement.removeAttribute("disabled");- const name = target.getAttribute("data-name");- if (40 == response.code) { // 使用数据仓库同步不需要对比同步方向- fetchPost("/api/sync/setCloudSyncDir", {name}, () => {- window.siyuan.config.sync.cloudName = name;- getCloudList(true);- });- return;- }-- confirmDialog(window.siyuan.languages.confirm, response.msg, () => {- fetchPost("/api/sync/setCloudSyncDir", {name}, () => {- window.siyuan.config.sync.cloudName = name;- getCloudList(true);- });- });- });- }+ fetchPost("/api/sync/setCloudSyncDir", {name: target.getAttribute("data-name")}, () => {+ window.siyuan.config.sync.cloudName = target.getAttribute("data-name");+ getCloudList(true);+ });break;}event.preventDefault();diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 698993f429..4020f4b212 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -89,7 +89,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {setTimeout(() => {insertEmptyBlock(protyle, "afterend");}, 100);- nodeElement.classList.remove("protyle-wysiwyg--select");return false;} else if (event.key.toLowerCase() === "b") {event.stopPropagation();@@ -98,7 +97,6 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {setTimeout(() => {insertEmptyBlock(protyle, "beforebegin");}, 100);- nodeElement.classList.remove("protyle-wysiwyg--select");return false;}}