incremental push / pull only modes

This commit is contained in:
fyears
2024-03-17 23:58:54 +08:00
parent d51659d3d1
commit 06bf59bf2a
9 changed files with 313 additions and 137 deletions
+6 -1
View File
@@ -94,6 +94,7 @@ const DEFAULT_SETTINGS: RemotelySavePluginSettings = {
conflictAction: "keep_newer",
howToCleanEmptyFolder: "skip",
protectModifyPercentage: 50,
syncDirection: "bidirectional",
};
interface OAuth2Info {
@@ -309,7 +310,8 @@ export default class RemotelySavePlugin extends Plugin {
mixedEntityMappings,
this.settings.howToCleanEmptyFolder ?? "skip",
this.settings.skipSizeLargerThan ?? -1,
this.settings.conflictAction ?? "keep_newer"
this.settings.conflictAction ?? "keep_newer",
this.settings.syncDirection ?? "bidirectional"
);
console.info(`mixedEntityMappings:`);
console.info(mixedEntityMappings); // for debugging
@@ -888,6 +890,9 @@ export default class RemotelySavePlugin extends Plugin {
if (this.settings.protectModifyPercentage === undefined) {
this.settings.protectModifyPercentage = 50;
}
if (this.settings.syncDirection === undefined) {
this.settings.syncDirection = "bidirectional";
}
await this.saveSettings();
}