New feature:

- Use dynamic iteration count
Fixed:
- Read chunks online will fetch the remote chunks correctly.
- Read chunks online will save fetched chunks to the local database.
This commit is contained in:
vorotamoroz
2022-12-22 17:58:52 +09:00
parent 81caad8602
commit b0f612b61c
4 changed files with 29 additions and 7 deletions
+3 -3
View File
@@ -418,7 +418,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
delete setting[k];
}
}
const encryptedSetting = encodeURIComponent(await encrypt(JSON.stringify(setting), encryptingPassphrase));
const encryptedSetting = encodeURIComponent(await encrypt(JSON.stringify(setting), encryptingPassphrase, false));
const uri = `${configURIBase}${encryptedSetting}`;
await navigator.clipboard.writeText(uri);
Logger("Setup URI copied to clipboard", LOG_LEVEL.NOTICE);
@@ -431,7 +431,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
const encryptingPassphrase = await askString(this.app, "Encrypt your settings", "Passphrase", "");
if (encryptingPassphrase === false) return;
const setting = { ...this.settings };
const encryptedSetting = encodeURIComponent(await encrypt(JSON.stringify(setting), encryptingPassphrase));
const encryptedSetting = encodeURIComponent(await encrypt(JSON.stringify(setting), encryptingPassphrase, false));
const uri = `${configURIBase}${encryptedSetting}`;
await navigator.clipboard.writeText(uri);
Logger("Setup URI copied to clipboard", LOG_LEVEL.NOTICE);
@@ -457,7 +457,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
const oldConf = JSON.parse(JSON.stringify(this.settings));
const encryptingPassphrase = await askString(this.app, "Passphrase", "Passphrase for your settings", "");
if (encryptingPassphrase === false) return;
const newConf = await JSON.parse(await decrypt(confString, encryptingPassphrase));
const newConf = await JSON.parse(await decrypt(confString, encryptingPassphrase, false));
if (newConf) {
const result = await askYesNo(this.app, "Importing LiveSync's conf, OK?");
if (result == "yes") {