An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: https://github.com/siyuan-note/siyuan/issues/8662
Vanessac9cd0efd47d3
diff --git a/app/src/sync/syncGuide.ts b/app/src/sync/syncGuide.tsindex 9a3b6361e6..07f444160e 100644--- a/app/src/sync/syncGuide.ts+++ b/app/src/sync/syncGuide.ts@@ -42,7 +42,7 @@ export const addCloudName = (cloudPanelElement: Element) => {});};-export const bindSyncCloudListEvent = (cloudPanelElement: Element) => {+export const bindSyncCloudListEvent = (cloudPanelElement: Element, cb?: () => void) => {cloudPanelElement.addEventListener("click", (event) => {let target = event.target as HTMLElement;while (target && !target.isEqualNode(cloudPanelElement)) {@@ -57,7 +57,7 @@ export const bindSyncCloudListEvent = (cloudPanelElement: Element) => {cloudPanelElement.innerHTML = '<img style="margin: 0 auto;display: block;width: 64px;height: 100%" src="/stage/loading-pure.svg">';fetchPost("/api/sync/removeCloudSyncDir", {name: target.parentElement.getAttribute("data-name")}, (response) => {window.siyuan.config.sync.cloudName = response.data;- getSyncCloudList(cloudPanelElement, true);+ getSyncCloudList(cloudPanelElement, true, cb);});});break;@@ -65,7 +65,7 @@ export const bindSyncCloudListEvent = (cloudPanelElement: Element) => {cloudPanelElement.innerHTML = '<img style="margin: 0 auto;display: block;width: 64px;height: 100%" src="/stage/loading-pure.svg">';fetchPost("/api/sync/setCloudSyncDir", {name: target.getAttribute("data-name")}, () => {window.siyuan.config.sync.cloudName = target.getAttribute("data-name");- getSyncCloudList(cloudPanelElement, true);+ getSyncCloudList(cloudPanelElement, true, cb);});break;}@@ -247,8 +247,14 @@ const setSync = (key?: string, dialog?: Dialog) => {});}const contentElement = dialog.element.querySelector(".b3-dialog__content").lastElementChild;- bindSyncCloudListEvent(contentElement);const btnElement = dialog.element.querySelector(".b3-button");+ bindSyncCloudListEvent(contentElement, () => {+ if (contentElement.querySelector("input[checked]")) {+ btnElement.removeAttribute("disabled");+ } else {+ btnElement.setAttribute("disabled", "disabled");+ }+ });getSyncCloudList(contentElement, false, () => {if (contentElement.querySelector("input[checked]")) {btnElement.removeAttribute("disabled");@@ -276,7 +282,7 @@ const setSync = (key?: string, dialog?: Dialog) => {}};-export const setKey = (isSync:boolean, cb?:() => void) => {+export const setKey = (isSync: boolean, cb?: () => void) => {const dialog = new Dialog({title: window.siyuan.languages.syncConfGuide1,content: `<div class="b3-dialog__content ft__center">