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: Open sync settings for disabled third-party providers https://github.com/siyuan-note/siyuan/issues/18556
Daniel1c50071bbb97
diff --git a/app/src/mobile/menu/index.ts b/app/src/mobile/menu/index.tsindex 295ae595f4..bc19230194 100644--- a/app/src/mobile/menu/index.ts+++ b/app/src/mobile/menu/index.ts@@ -226,7 +226,7 @@ export const initRightMenu = (app: App) => {event.stopPropagation();break;} else if (target.id === "menuSyncNow") {- syncGuide();+ syncGuide(app);event.preventDefault();event.stopPropagation();break;diff --git a/app/src/sync/syncGuide.ts b/app/src/sync/syncGuide.tsindex f3253362b9..e246ebf073 100644--- a/app/src/sync/syncGuide.ts+++ b/app/src/sync/syncGuide.ts@@ -12,6 +12,17 @@ import type {App} from "../index";import {Constants} from "../constants";import {getCloudURL} from "../config/util/about";+const openSyncSetting = (app?: App) => {+ if (!app) {+ return;+ }+ /// #if MOBILE+ void import("../mobile/menu").then(({openMobileSetting}) => openMobileSetting(app, "sync"));+ /// #else+ openSetting(app, "sync");+ /// #endif+};+export const addCloudName = (cloudListElement: Element) => {const dialog = new Dialog({title: window.siyuan.languages.cloudSyncDir,@@ -157,22 +168,18 @@ export const syncGuide = (app?: App) => {return;}if (window.siyuan.config.sync.provider === 0 && needSubscribe()) {- /// #if !MOBILE- if (app) {- openSetting(app, "sync");- }- /// #endif+ openSyncSetting(app);showMessage(window.siyuan.languages._kernel[29].replaceAll("${accountServer}", getCloudURL("")));return;} else if (!isPaidUser()) {- /// #if !MOBILE- if (app) {- openSetting(app, "sync");- }- /// #endif+ openSyncSetting(app);showMessage(window.siyuan.languages._kernel[214].replaceAll("${accountServer}", getCloudURL("")));return;}+ if (!window.siyuan.config.sync.enabled && window.siyuan.config.sync.provider !== 0) {+ openSyncSetting(app);+ return;+ }if (!window.siyuan.config.repo.key) {setKey(true);return;