mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-01 13:58:18 +00:00
Simplify remote feature checks and clarify manual rebuild guidance
This commit is contained in:
1 parent
9a047d44f3
commit
2c6cd56618
15 files changed
+251
-684
No files matched your search
@@ -336,6 +336,31 @@ export class SetupManager extends AbstractModule {
|
||||
this._log("E2EE configuration cancelled.", LOG_LEVEL_NOTICE);
|
||||
return false;
|
||||
}
|
||||
const onlyInternalMetadataPreferenceChanged =
|
||||
currentSetting.encryptInternalMetadata !== e2eeConf.encryptInternalMetadata &&
|
||||
currentSetting.encrypt === e2eeConf.encrypt &&
|
||||
currentSetting.passphrase === e2eeConf.passphrase &&
|
||||
currentSetting.E2EEAlgorithm === e2eeConf.E2EEAlgorithm &&
|
||||
currentSetting.usePathObfuscation === e2eeConf.usePathObfuscation;
|
||||
if (userMode === UserMode.Update && onlyInternalMetadataPreferenceChanged) {
|
||||
if (e2eeConf.encryptInternalMetadata && currentSetting.remoteType === REMOTE_COUCHDB) {
|
||||
const proceed = "Enable without rebuilding — update every other device first";
|
||||
const choice = await this.core.confirm.askSelectStringDialogue(
|
||||
"A manual remote Rebuild is strongly recommended to protect existing Metadata. " +
|
||||
"Before continuing without rebuilding, update every other synchronising device to a version " +
|
||||
"which supports this option, including devices currently running LiveSync. " +
|
||||
"Existing Metadata remains unchanged until it is rewritten or rebuilt.",
|
||||
[proceed, "Cancel"],
|
||||
{ title: "Encrypt internal file Metadata", defaultAction: "Cancel" }
|
||||
);
|
||||
if (choice !== proceed) return false;
|
||||
}
|
||||
await this.services.setting.applyPartial(
|
||||
{ encryptInternalMetadata: e2eeConf.encryptInternalMetadata },
|
||||
true
|
||||
);
|
||||
return true;
|
||||
}
|
||||
const newSetting = {
|
||||
...currentSetting,
|
||||
...e2eeConf,
|
||||
|
||||
Reference in new issue
Block a user