diff --git a/app/src/sync/syncGuide.ts b/app/src/sync/syncGuide.ts
index bb20ffd8a..3db55f032 100644
--- a/app/src/sync/syncGuide.ts
+++ b/app/src/sync/syncGuide.ts
@@ -137,7 +137,38 @@ export const syncGuide = (element?: Element) => {
setSync();
return;
}
- fetchPost("/api/sync/performSync", {});
+ if (window.siyuan.config.sync.mode !== 3) {
+ fetchPost("/api/sync/performSync", {});
+ return;
+ }
+ const manualDialog = new Dialog({
+ title: window.siyuan.languages.syncMod3,
+ content: `
+
+
+
+
+
+
`,
+ width: isMobile() ? "80vw" : "520px",
+ });
+ const btnsElement = manualDialog.element.querySelectorAll(".b3-button");
+ btnsElement[0].addEventListener("click", () => {
+ manualDialog.destroy();
+ });
+ btnsElement[1].addEventListener("click", () => {
+ const uploadElement = manualDialog.element.querySelector("input[name=upload]:checked") as HTMLInputElement
+ if (!uploadElement) {
+ showMessage(window.siyuan.languages.plsChoose)
+ return
+ }
+ fetchPost("/api/sync/performSync", {upload: uploadElement.value === "true"});
+ manualDialog.destroy();
+ });
};
const setSync = (key?: string, dialog?: Dialog) => {