Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/8220

Vanessa7dbfa43de471
diff --git a/app/src/sync/syncGuide.ts b/app/src/sync/syncGuide.ts
index 148b3d813f..1f8e7358e5 100644
--- a/app/src/sync/syncGuide.ts
+++ b/app/src/sync/syncGuide.ts
@@ -5,7 +5,9 @@ import {Dialog} from "../dialog";
import {confirmDialog} from "../dialog/confirmDialog";
import {isMobile} from "../util/functions";
import {processSync} from "../dialog/processSystem";
+/// #if !MOBILE
import {openSetting} from "../config";
+/// #endif
import {App} from "../index";
export const addCloudName = (cloudPanelElement: Element) => {
@@ -144,25 +146,25 @@ export const syncGuide = (app?: App) => {
if (window.siyuan.config.readonly) {
return;
}
- if (isMobile()) {
- if (0 === window.siyuan.config.sync.provider && needSubscribe()) {
- return;
- }
- } else {
- if (document.querySelector("#barSync")?.classList.contains("toolbar__item--active")) {
- return;
- }
- if (0 === window.siyuan.config.sync.provider && needSubscribe("") && app) {
- const dialogSetting = openSetting(app);
- if (window.siyuan.user) {
- dialogSetting.element.querySelector('.b3-tab-bar [data-name="repos"]').dispatchEvent(new CustomEvent("click"));
- } else {
- dialogSetting.element.querySelector('.b3-tab-bar [data-name="account"]').dispatchEvent(new CustomEvent("click"));
- dialogSetting.element.querySelector('.config__tab-container[data-name="account"]').setAttribute("data-action", "go-repos");
- }
- return;
+ /// #if MOBILE
+ if (0 === window.siyuan.config.sync.provider && needSubscribe()) {
+ return;
+ }
+ /// #else
+ if (document.querySelector("#barSync")?.classList.contains("toolbar__item--active")) {
+ return;
+ }
+ if (0 === window.siyuan.config.sync.provider && needSubscribe("") && app) {
+ const dialogSetting = openSetting(app);
+ if (window.siyuan.user) {
+ dialogSetting.element.querySelector('.b3-tab-bar [data-name="repos"]').dispatchEvent(new CustomEvent("click"));
+ } else {
+ dialogSetting.element.querySelector('.b3-tab-bar [data-name="account"]').dispatchEvent(new CustomEvent("click"));
+ dialogSetting.element.querySelector('.config__tab-container[data-name="account"]').setAttribute("data-action", "go-repos");
}
+ return;
}
+ /// #endif
if (!window.siyuan.config.repo.key) {
setKey();
return;