Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/8556

Vanessae892323aeda5
diff --git a/app/src/config/account.ts b/app/src/config/account.ts
index 2420c69012..5bb5de1645 100644
--- a/app/src/config/account.ts
+++ b/app/src/config/account.ts
@@ -7,6 +7,9 @@ import {confirmDialog} from "../dialog/confirmDialog";
import {hasClosestByClassName} from "../protyle/util/hasClosest";
import {getEventName} from "../protyle/util/compatibility";
import {processSync} from "../dialog/processSystem";
+import {needSubscribe} from "../util/needSubscribe";
+import {syncGuide} from "../sync/syncGuide";
+import {hideElements} from "../protyle/ui/hideElements";
export const account = {
element: undefined as Element,
@@ -367,10 +370,15 @@ ${window.siyuan.languages.account9}
account.bindEvent(element);
account.onSetaccount();
if (element.getAttribute("data-action") === "go-repos") {
- const dialogElement = hasClosestByClassName(element, "b3-dialog--open");
- if (dialogElement) {
- dialogElement.querySelector('.b3-tab-bar [data-name="repos"]').dispatchEvent(new CustomEvent("click"));
- element.removeAttribute("data-action");
+ if (needSubscribe()) {
+ const dialogElement = hasClosestByClassName(element, "b3-dialog--open");
+ if (dialogElement) {
+ dialogElement.querySelector('.b3-tab-bar [data-name="repos"]').dispatchEvent(new CustomEvent("click"));
+ element.removeAttribute("data-action");
+ }
+ } else {
+ hideElements(["dialog"]);
+ syncGuide();
}
}
},