From e892323aeda5f919e50ada35722c5a3d38ce003a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 16 Jun 2023 10:26:16 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8556 --- app/src/config/account.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/src/config/account.ts b/app/src/config/account.ts index 2420c6901..5bb5de164 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(); } } },