mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-03 22:31:55 +00:00
Improved:
- Overall performance has been improved by using PouchDB 9.0.0. - Configuration mismatch detection is refined. We can resolve mismatches more smoothly and naturally. Fixed: - Customisation Sync will be disabled when a corrupted configuration is detected. New feature: - We can get a notification about the storage usage of the remote database.
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
statusDisplay,
|
||||
type ConfigurationItem
|
||||
} from "../lib/src/common/types.ts";
|
||||
import { createBlob, delay, isDocContentSame, isObjectDifferent, readAsBlob, unique } from "../lib/src/common/utils.ts";
|
||||
import { createBlob, delay, isDocContentSame, isObjectDifferent, readAsBlob, sizeToHumanReadable, unique } from "../lib/src/common/utils.ts";
|
||||
import { versionNumberString2Number } from "../lib/src/string_and_binary/convert.ts";
|
||||
import { Logger } from "../lib/src/common/logger.ts";
|
||||
import { checkSyncInfo, isCloudantURI } from "../lib/src/pouchdb/utils_couchdb.ts";
|
||||
@@ -586,6 +586,12 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
const trialSetting = { ...this.editingSettings, ...settingOverride };
|
||||
const replicator = this.plugin.getNewReplicator(trialSetting);
|
||||
await replicator.tryConnectRemote(trialSetting);
|
||||
const status = await replicator.getRemoteStatus(trialSetting);
|
||||
if (status) {
|
||||
if (status.estimatedSize) {
|
||||
Logger(`Estimated size: ${sizeToHumanReadable(status.estimatedSize)}`, LOG_LEVEL_NOTICE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closeSetting() {
|
||||
@@ -1188,6 +1194,10 @@ However, your report is needed to stabilise this. I appreciate you for your grea
|
||||
.addOnUpdate(onlyOnCouchDB)
|
||||
}, onlyOnCouchDB);
|
||||
|
||||
this.createEl(containerRemoteDatabaseEl, "h4", { text: "Notification" }).addClass("wizardHidden")
|
||||
new Setting(containerRemoteDatabaseEl).autoWireNumeric("notifyThresholdOfRemoteStorageSize", {}).setClass("wizardHidden");
|
||||
|
||||
|
||||
this.createEl(containerRemoteDatabaseEl, "h4", { text: "Effective Storage Using" }).addClass("wizardHidden")
|
||||
|
||||
new Setting(containerRemoteDatabaseEl).autoWireToggle("useEden").setClass("wizardHidden");
|
||||
|
||||
@@ -320,6 +320,10 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
|
||||
batchSaveMaximumDelay: {
|
||||
name: "Maximum delay for batch database updating",
|
||||
desc: "Saving will be performed forcefully after this number of seconds."
|
||||
},
|
||||
"notifyThresholdOfRemoteStorageSize": {
|
||||
name: "Notify when the estimated remote storage size exceeds on start up",
|
||||
desc: "MB (0 to disable)."
|
||||
}
|
||||
}
|
||||
function translateInfo(infoSrc: ConfigurationItem | undefined | false) {
|
||||
|
||||
Reference in New Issue
Block a user