fix folder sync

This commit is contained in:
fyears
2024-06-12 23:02:26 +08:00
parent adacda7ee5
commit 9f67d41786
6 changed files with 110 additions and 141 deletions
+5 -1
View File
@@ -165,7 +165,6 @@ export interface RemotelySavePluginSettings {
enableStatusBarInfo?: boolean;
deleteToWhere?: "system" | "obsidian";
conflictAction?: ConflictActionType;
howToCleanEmptyFolder?: EmptyFolderCleanType;
protectModifyPercentage?: number;
syncDirection?: SyncDirectionType;
@@ -194,6 +193,11 @@ export interface RemotelySavePluginSettings {
* @deprecated
*/
logToDB?: boolean;
/**
* @deprecated
*/
howToCleanEmptyFolder?: EmptyFolderCleanType;
}
export const COMMAND_URI = "remotely-save";
+1 -1
View File
@@ -1,5 +1,6 @@
import type { Vault } from "obsidian";
import type { SyncPlanType } from "../pro/src/sync";
import {
DEFAULT_DEBUG_FOLDER,
DEFAULT_PROFILER_RESULT_FILE_PREFIX,
@@ -11,7 +12,6 @@ import {
} from "./localdb";
import type { InternalDBs } from "./localdb";
import { mkdirpInVault } from "./misc";
import type { SyncPlanType } from "./sync";
const getSubsetOfSyncPlan = (x: string, onlyChange: boolean) => {
if (!onlyChange) {
+1 -1
View File
@@ -6,9 +6,9 @@ ep2(localforage);
export type LocalForage = typeof localforage;
import { nanoid } from "nanoid";
import type { SyncPlanType } from "../pro/src/sync";
import type { Entity, SUPPORTED_SERVICES_TYPE } from "./baseTypes";
import { unixTimeToStr } from "./misc";
import type { SyncPlanType } from "./sync";
const DB_VERSION_NUMBER_IN_HISTORY = [20211114, 20220108, 20220326, 20240220];
export const DEFAULT_DB_VERSION_NUMBER: number = 20240220;
+1 -1
View File
@@ -48,6 +48,7 @@ import {
sendAuthReq as sendAuthReqYandexDisk,
setConfigBySuccessfullAuthInplace as setConfigBySuccessfullAuthInplaceYandexDisk,
} from "../pro/src/fsYandexDisk";
import { syncer } from "../pro/src/sync";
import type {
RemotelySavePluginSettings,
SyncTriggerSourceType,
@@ -93,7 +94,6 @@ import {
import { changeMobileStatusBar } from "./misc";
import { DEFAULT_PROFILER_CONFIG, type Profiler } from "./profiler";
import { RemotelySaveSettingTab } from "./settings";
import { syncer } from "./sync";
import { SyncAlgoV3Modal } from "./syncAlgoV3Notice";
const DEFAULT_SETTINGS: RemotelySavePluginSettings = {
-18
View File
@@ -2250,24 +2250,6 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
});
});
new Setting(advDiv)
.setName(t("settings_cleanemptyfolder"))
.setDesc(t("settings_cleanemptyfolder_desc"))
.addDropdown((dropdown) => {
dropdown.addOption("skip", t("settings_cleanemptyfolder_skip"));
dropdown.addOption(
"clean_both",
t("settings_cleanemptyfolder_clean_both")
);
dropdown
.setValue(this.plugin.settings.howToCleanEmptyFolder ?? "clean_both")
.onChange(async (val) => {
this.plugin.settings.howToCleanEmptyFolder =
val as EmptyFolderCleanType;
await this.plugin.saveSettings();
});
});
const percentage1 = new Setting(advDiv)
.setName(t("settings_protectmodifypercentage"))
.setDesc(t("settings_protectmodifypercentage_desc"));
-1718
View File
File diff suppressed because it is too large Load Diff