mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-15 08:30:42 +08:00
🎨 启动同步后立即同步应判断是否为手动同步
This commit is contained in:
parent
79b87b25ad
commit
6d97c2813b
@ -137,6 +137,10 @@ export const syncGuide = (element?: Element) => {
|
||||
setSync();
|
||||
return;
|
||||
}
|
||||
syncNow();
|
||||
};
|
||||
|
||||
const syncNow = () => {
|
||||
if (window.siyuan.config.sync.mode !== 3) {
|
||||
fetchPost("/api/sync/performSync", {});
|
||||
return;
|
||||
@ -180,7 +184,7 @@ export const syncGuide = (element?: Element) => {
|
||||
fetchPost("/api/sync/performSync", {upload: uploadElement.value === "true"});
|
||||
manualDialog.destroy();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const setSync = (key?: string, dialog?: Dialog) => {
|
||||
if (key) {
|
||||
@ -222,7 +226,7 @@ const setSync = (key?: string, dialog?: Dialog) => {
|
||||
window.siyuan.config.sync.enabled = true;
|
||||
processSync();
|
||||
confirmDialog(window.siyuan.languages.syncConfGuide4, window.siyuan.languages.syncConfGuide5, () => {
|
||||
fetchPost("/api/sync/performSync", {});
|
||||
syncNow();
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -231,7 +235,7 @@ const setSync = (key?: string, dialog?: Dialog) => {
|
||||
dialog.destroy();
|
||||
}
|
||||
confirmDialog(window.siyuan.languages.syncConfGuide4, window.siyuan.languages.syncConfGuide5, () => {
|
||||
fetchPost("/api/sync/performSync", {});
|
||||
syncNow();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user