Fix up wording of messages

This commit is contained in:
Volkor
2024-11-18 21:55:22 +11:00
parent ed5cb3e043
commit 7eceab59af
8 changed files with 136 additions and 127 deletions

View File

@@ -98,9 +98,9 @@ export class DocumentHistoryModal extends Modal {
this.range.max = "0"; this.range.max = "0";
this.range.value = ""; this.range.value = "";
this.range.disabled = true; this.range.disabled = true;
this.contentView.setText(`History of this file was not recorded.`); this.contentView.setText(`We don't have any history for this note.`);
} else { } else {
this.contentView.setText(`Error occurred.`); this.contentView.setText(`Error while loading file.`);
Logger(ex, LOG_LEVEL_VERBOSE); Logger(ex, LOG_LEVEL_VERBOSE);
} }
} }
@@ -268,7 +268,7 @@ export class DocumentHistoryModal extends Modal {
const leaf = this.plugin.app.workspace.getLeaf(false); const leaf = this.plugin.app.workspace.getLeaf(false);
await leaf.openFile(targetFile); await leaf.openFile(targetFile);
} else { } else {
Logger("The file could not view on the editor", LOG_LEVEL_NOTICE); Logger("Unable to display the file in the editor", LOG_LEVEL_NOTICE);
} }
}; };
buttons.createEl("button", { text: "Back to this revision" }, (e) => { buttons.createEl("button", { text: "Back to this revision" }, (e) => {

View File

@@ -148,7 +148,7 @@ export class ModuleInteractiveConflictResolver extends AbstractObsidianModule im
this._log(`Conflicted: ${note.path}`); this._log(`Conflicted: ${note.path}`);
} }
} else { } else {
this._log(`There are no conflicted files`, LOG_LEVEL_VERBOSE); this._log(`There are no conflicting files`, LOG_LEVEL_VERBOSE);
} }
return true; return true;
} }

View File

@@ -52,7 +52,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
const passphrase = await this.getPassphrase(settings); const passphrase = await this.getPassphrase(settings);
if (passphrase === false) { if (passphrase === false) {
this._log( this._log(
"Could not determine passphrase to save data.json! You probably make the configuration sure again!", "Failed to obtain passphrase when saving data.json! Please verify the configuration.",
LOG_LEVEL_URGENT LOG_LEVEL_URGENT
); );
return ""; return "";
@@ -76,7 +76,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
settings.deviceAndVaultName = ""; settings.deviceAndVaultName = "";
if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) { if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) {
this._log( this._log(
"Could not determine passphrase for saving data.json! Our data.json have insecure items!", "Failed to retrieve passphrase. data.json contains unencrypted items!",
LOG_LEVEL_NOTICE LOG_LEVEL_NOTICE
); );
} else { } else {
@@ -145,7 +145,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
const passphrase = await this.getPassphrase(settings); const passphrase = await this.getPassphrase(settings);
if (passphrase === false) { if (passphrase === false) {
this._log( this._log(
"Could not determine passphrase for reading data.json! DO NOT synchronize with the remote before making sure your configuration is!", "No passphrase found for data.json! Verify configuration before syncing.",
LOG_LEVEL_URGENT LOG_LEVEL_URGENT
); );
} else { } else {
@@ -173,7 +173,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
} }
} else { } else {
this._log( this._log(
"Could not decrypt passphrase for reading data.json! DO NOT synchronize with the remote before making sure your configuration is!", "Failed to decrypt passphrase from data.json! Ensure configuration is correct before syncing with remote.",
LOG_LEVEL_URGENT LOG_LEVEL_URGENT
); );
for (const key of keys) { for (const key of keys) {
@@ -189,7 +189,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
settings.passphrase = decrypted; settings.passphrase = decrypted;
} else { } else {
this._log( this._log(
"Could not decrypt passphrase for reading data.json! DO NOT synchronize with the remote before making sure your configuration is!", "Failed to decrypt passphrase from data.json! Ensure configuration is correct before syncing with remote.",
LOG_LEVEL_URGENT LOG_LEVEL_URGENT
); );
settings.passphrase = ""; settings.passphrase = "";
@@ -220,7 +220,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
} }
if (isCloudantURI(this.settings.couchDB_URI) && this.settings.customChunkSize != 0) { if (isCloudantURI(this.settings.couchDB_URI) && this.settings.customChunkSize != 0) {
this._log( this._log(
"Configuration verification founds problems with your configuration. This has been fixed automatically. But you may already have data that cannot be synchronised. If this is the case, please rebuild everything.", "Configuration issues detected and automatically resolved. However, unsynchronized data may exist. Consider rebuilding if necessary.",
LOG_LEVEL_NOTICE LOG_LEVEL_NOTICE
); );
this.settings.customChunkSize = 0; this.settings.customChunkSize = 0;
@@ -228,7 +228,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
this.core.$$setDeviceAndVaultName(localStorage.getItem(lsKey) || ""); this.core.$$setDeviceAndVaultName(localStorage.getItem(lsKey) || "");
if (this.core.$$getDeviceAndVaultName() == "") { if (this.core.$$getDeviceAndVaultName() == "") {
if (this.settings.usePluginSync) { if (this.settings.usePluginSync) {
this._log("Device name is not set. Plug-in sync has been disabled.", LOG_LEVEL_NOTICE); this._log("Device name missing. Disabling plug-in sync.", LOG_LEVEL_NOTICE);
this.settings.usePluginSync = false; this.settings.usePluginSync = false;
} }
} }

View File

@@ -92,7 +92,7 @@ export class ModuleObsidianSettingsAsMarkdown extends AbstractObsidianModule imp
if (automated && !this.settings.notifyAllSettingSyncFile) { if (automated && !this.settings.notifyAllSettingSyncFile) {
if (!this.settings.settingSyncFile || this.settings.settingSyncFile != filename) { if (!this.settings.settingSyncFile || this.settings.settingSyncFile != filename) {
this._log( this._log(
`Setting file (${filename}) is not matched to the current configuration. skipped.`, `Setting file (${filename}) does not match the current configuration. skipped.`,
LOG_LEVEL_DEBUG LOG_LEVEL_DEBUG
); );
return; return;

View File

@@ -139,11 +139,11 @@ export class ModuleSetupObsidian extends AbstractObsidianModule implements IObsi
newSettingW.encryptedPassphrase = ""; newSettingW.encryptedPassphrase = "";
newSettingW.encryptedCouchDBConnection = ""; newSettingW.encryptedCouchDBConnection = "";
newSettingW.additionalSuffixOfDatabaseName = `${"appId" in this.app ? this.app.appId : ""}`; newSettingW.additionalSuffixOfDatabaseName = `${"appId" in this.app ? this.app.appId : ""}`;
const setupJustImport = "Just import setting"; const setupJustImport = "Don't sync anything, just apply the settings.";
const setupAsNew = "Set it up as secondary or subsequent device"; const setupAsNew = "This is a new client - sync everything from the remote server.";
const setupAsMerge = "Secondary device but try keeping local changes"; const setupAsMerge = "This is an existing client - merge existing files with the server.";
const setupAgain = "Reconfigure and reconstitute the data"; const setupAgain = "This is a new server - reset remote server and use local files.";
const setupManually = "Leave everything to me"; const setupManually = "Continue and configure manually.";
newSettingW.syncInternalFiles = false; newSettingW.syncInternalFiles = false;
newSettingW.usePluginSync = false; newSettingW.usePluginSync = false;
newSettingW.isConfigured = true; newSettingW.isConfigured = true;
@@ -171,10 +171,10 @@ export class ModuleSetupObsidian extends AbstractObsidianModule implements IObsi
await this.core.rebuilder.$fetchLocal(true); await this.core.rebuilder.$fetchLocal(true);
} else if (setupType == setupAgain) { } else if (setupType == setupAgain) {
const confirm = const confirm =
"I know this operation will rebuild all my databases with files on this device, and files that are on the remote database and I didn't synchronize to any other devices will be lost and want to proceed indeed."; "This operation will rebuild all databases with files on this device. Any files on the remote database not synced here will be lost.";
if ( if (
(await this.core.confirm.askSelectStringDialogue( (await this.core.confirm.askSelectStringDialogue(
"Do you really want to do this?", "Are you sure you want to do this?",
["Cancel", confirm], ["Cancel", confirm],
{ defaultAction: "Cancel" } { defaultAction: "Cancel" }
)) != confirm )) != confirm

View File

@@ -463,7 +463,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
// And modified. // And modified.
this.plugin.confirm.askInPopup( this.plugin.confirm.askInPopup(
`config-reloaded-${k}`, `config-reloaded-${k}`,
`The setting "${getConfName(k as AllSettingItemKey)}" being in editing has been changed from somewhere. We can discard modification and reload by clicking {HERE}. Click elsewhere to ignore changes`, `The setting "${getConfName(k as AllSettingItemKey)}" was modified from another device. Click {HERE} to reload settings. Click elsewhere to ignore changes`,
(anchor) => { (anchor) => {
anchor.text = "HERE"; anchor.text = "HERE";
anchor.addEventListener("click", () => { anchor.addEventListener("click", () => {
@@ -622,7 +622,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
| Symbol | Meaning | | Symbol | Meaning |
|: ------ :| ------- | |: ------ :| ------- |
| ⇔ | Synchronised or well balanced | | ⇔ | Up to Date |
| ⇄ | Synchronise to balance | | ⇄ | Synchronise to balance |
| ⇐,⇒ | Transfer to overwrite | | ⇐,⇒ | Transfer to overwrite |
| ⇠,⇢ | Transfer to overwrite from other side | | ⇠,⇢ | Transfer to overwrite from other side |
@@ -847,7 +847,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
return true; return true;
} else { } else {
Logger( Logger(
"ERROR: Passphrase is not compatible with the remote server! Please confirm it again!", "ERROR: Passphrase is not compatible with the remote server! Please check it again!",
LOG_LEVEL_NOTICE LOG_LEVEL_NOTICE
); );
return false; return false;
@@ -856,7 +856,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
}; };
const isPassphraseValid = async () => { const isPassphraseValid = async () => {
if (this.editingSettings.encrypt && this.editingSettings.passphrase == "") { if (this.editingSettings.encrypt && this.editingSettings.passphrase == "") {
Logger("If you enable encryption, you have to set the passphrase", LOG_LEVEL_NOTICE); Logger("You cannot enable encryption without a passphrase", LOG_LEVEL_NOTICE);
return false; return false;
} }
if (this.editingSettings.encrypt && !(await testCrypt())) { if (this.editingSettings.encrypt && !(await testCrypt())) {
@@ -870,11 +870,11 @@ Store only the settings. **Caution: This may lead to data corruption**; database
method: "localOnly" | "remoteOnly" | "rebuildBothByThisDevice" | "localOnlyWithChunks" method: "localOnly" | "remoteOnly" | "rebuildBothByThisDevice" | "localOnlyWithChunks"
) => { ) => {
if (this.editingSettings.encrypt && this.editingSettings.passphrase == "") { if (this.editingSettings.encrypt && this.editingSettings.passphrase == "") {
Logger("If you enable encryption, you have to set the passphrase", LOG_LEVEL_NOTICE); Logger("You cannot enable encryption without a passphrase", LOG_LEVEL_NOTICE);
return; return;
} }
if (this.editingSettings.encrypt && !(await testCrypt())) { if (this.editingSettings.encrypt && !(await testCrypt())) {
Logger("WARNING! Your device does not support encryption.", LOG_LEVEL_NOTICE); Logger("Your device does not support encryption.", LOG_LEVEL_NOTICE);
return; return;
} }
if (!this.editingSettings.encrypt) { if (!this.editingSettings.encrypt) {
@@ -886,7 +886,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
this.reloadAllSettings(); this.reloadAllSettings();
this.editingSettings.isConfigured = true; this.editingSettings.isConfigured = true;
Logger( Logger(
"All synchronizations have been temporarily disabled. Please enable them after the fetching, if you need them.", "Syncing has been disabled, fetch and re-enabled if desired.",
LOG_LEVEL_NOTICE LOG_LEVEL_NOTICE
); );
await this.saveAllDirtySettings(); await this.saveAllDirtySettings();
@@ -896,14 +896,14 @@ Store only the settings. **Caution: This may lead to data corruption**; database
}; };
// Panes // Panes
void addPane(containerEl, "Update Information", "💬", 100, false).then((paneEl) => { void addPane(containerEl, "Change Log", "💬", 100, false).then((paneEl) => {
const informationDivEl = this.createEl(paneEl, "div", { text: "" }); const informationDivEl = this.createEl(paneEl, "div", { text: "" });
const tmpDiv = createDiv(); const tmpDiv = createDiv();
// tmpDiv.addClass("sls-header-button"); // tmpDiv.addClass("sls-header-button");
tmpDiv.addClass("op-warn-info"); tmpDiv.addClass("op-warn-info");
tmpDiv.innerHTML = `<p>Did you come here because of an upgrade notification? Read the version history and, if you are satisfied, press the button. I will bring it out again in the next version.</p><button> OK, I read everything. </button>`; tmpDiv.innerHTML = `<p>Here due to an upgrade notification? Please review the version history. If you're satisfied, click the button. A new update will prompt this again.</p><button> OK, I have read everything. </button>`;
if (lastVersion > (this.editingSettings?.lastReadUpdates || 0)) { if (lastVersion > (this.editingSettings?.lastReadUpdates || 0)) {
const informationButtonDiv = informationDivEl.appendChild(tmpDiv); const informationButtonDiv = informationDivEl.appendChild(tmpDiv);
informationButtonDiv.querySelector("button")?.addEventListener("click", () => { informationButtonDiv.querySelector("button")?.addEventListener("click", () => {
@@ -922,8 +922,8 @@ Store only the settings. **Caution: This may lead to data corruption**; database
void addPane(containerEl, "Setup", "🧙‍♂️", 110, false).then((paneEl) => { void addPane(containerEl, "Setup", "🧙‍♂️", 110, false).then((paneEl) => {
void addPanel(paneEl, "Quick Setup").then((paneEl) => { void addPanel(paneEl, "Quick Setup").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setName("Use the copied setup URI") .setName("Connect with Setup URI")
.setDesc("To setup Self-hosted LiveSync, this method is the most preferred one.") .setDesc("This is the recommended method to set up Self-hosted LiveSync with a Setup URI.")
.addButton((text) => { .addButton((text) => {
text.setButtonText("Use").onClick(() => { text.setButtonText("Use").onClick(() => {
this.closeSetting(); this.closeSetting();
@@ -931,13 +931,16 @@ Store only the settings. **Caution: This may lead to data corruption**; database
}); });
}); });
new Setting(paneEl).setName("Minimal setup").addButton((text) => { new Setting(paneEl)
.setName("Manual setup").addButton((text)
.setDesc("Not recommended, but useful if you don't have a Setup URI") => {
text.setButtonText("Start").onClick(async () => { text.setButtonText("Start").onClick(async () => {
await this.enableMinimalSetup(); await this.enableMinimalSetup();
}); });
}); });
new Setting(paneEl) new Setting(paneEl)
.setName("Enable LiveSync on this device as the setup was completed manually") .setName("Enable LiveSync")
.setDesc("Only enable this after configuring either of the above two options.")
.addOnUpdate(visibleOnly(() => !this.isConfiguredAs("isConfigured", true))) .addOnUpdate(visibleOnly(() => !this.isConfiguredAs("isConfigured", true)))
.addButton((text) => { .addButton((text) => {
text.setButtonText("Enable").onClick(async () => { text.setButtonText("Enable").onClick(async () => {
@@ -954,7 +957,10 @@ Store only the settings. **Caution: This may lead to data corruption**; database
undefined, undefined,
visibleOnly(() => this.isConfiguredAs("isConfigured", true)) visibleOnly(() => this.isConfiguredAs("isConfigured", true))
).then((paneEl) => { ).then((paneEl) => {
new Setting(paneEl).setName("Copy current settings as a new setup URI").addButton((text) => { new Setting(paneEl)
.setName("Copy the current settings to a Setup URI")
.setDesc("Perfect for setting up a new device!")
.addButton((text) => {
text.setButtonText("Copy").onClick(() => { text.setButtonText("Copy").onClick(() => {
// await this.plugin.addOnSetup.command_copySetupURI(); // await this.plugin.addOnSetup.command_copySetupURI();
eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI); eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI);
@@ -1182,7 +1188,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
}; };
addResult("---Notice---", ["ob-btn-config-head"]); addResult("---Notice---", ["ob-btn-config-head"]);
addResult( addResult(
"If the server configuration is not persistent (e.g., running on docker), the values set from here will also be volatile. Once you are able to connect, please reflect the settings in the server's local.ini.", "If the server configuration is not persistent (e.g., running on docker), the values here may change. Once you are able to connect, please update the settings in the server's local.ini.",
["ob-btn-config-info"] ["ob-btn-config-info"]
); );
@@ -1191,9 +1197,9 @@ Store only the settings. **Caution: This may lead to data corruption**; database
// Admin check // Admin check
// for database creation and deletion // for database creation and deletion
if (!(this.editingSettings.couchDB_USER in responseConfig.admins)) { if (!(this.editingSettings.couchDB_USER in responseConfig.admins)) {
addResult(`⚠ You do not have administrative privileges.`); addResult(`⚠ You do not have administrator privileges.`);
} else { } else {
addResult("✔ You have administrative privileges."); addResult("✔ You have administrator privileges.");
} }
// HTTP user-authorization check // HTTP user-authorization check
if (responseConfig?.chttpd?.require_valid_user != "true") { if (responseConfig?.chttpd?.require_valid_user != "true") {
@@ -1313,7 +1319,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
} }
addResult("--Done--", ["ob-btn-config-head"]); addResult("--Done--", ["ob-btn-config-head"]);
addResult( addResult(
"If you have some trouble with Connection-check even though all Config-check has been passed, please check your reverse proxy's configuration.", "If you're having trouble with the Connection-check (even after checking config), please check your reverse proxy configuration.",
["ob-btn-config-info"] ["ob-btn-config-info"]
); );
Logger(`Checking configuration done`, LOG_LEVEL_INFO); Logger(`Checking configuration done`, LOG_LEVEL_INFO);
@@ -1348,13 +1354,14 @@ Store only the settings. **Caution: This may lead to data corruption**; database
const syncWarnMinio = this.createEl(paneEl, "div", { const syncWarnMinio = this.createEl(paneEl, "div", {
text: "", text: "",
}); });
const ObjectStorageMessage = `Kindly notice: this is a pretty experimental feature, hence we have some limitations. const ObjectStorageMessage = `WARNING: This feature is a Work In Progress, so please keep in mind the following:
- Append only architecture. It will not shrink used storage if we do not perform a rebuild. - Append only architecture. A rebuild is required to shrink the storage.
- A bit fragile. - A bit fragile.
- During the first synchronization, the entire history to date will be transferred. For this reason, it is preferable to do this while connected to a Wi-Fi network. - When first syncing, all history will be transferred from the server. Be mindful of data caps and slow speeds.
- From the second, we always transfer only differences. - Only differences are synced live.
However, your report is needed to stabilise this. I appreciate you for your great dedication. If you run into any issues, or have ideas about this feature, please create a issue on GitHub.
I appreciate you for your great dedication.
`; `;
void MarkdownRenderer.render( void MarkdownRenderer.render(
@@ -1408,7 +1415,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
paneEl, paneEl,
"div", "div",
{ {
text: `Configured as using non-HTTPS. We cannot connect to the remote. Please set up the credentials and use HTTPS for the remote URI.`, text: `Cannot connect to non-HTTPS URI. Please update your config and try again.`,
}, },
undefined, undefined,
visibleOnly(() => !this.editingSettings.couchDB_URI.startsWith("https://")) visibleOnly(() => !this.editingSettings.couchDB_URI.startsWith("https://"))
@@ -1418,7 +1425,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
paneEl, paneEl,
"div", "div",
{ {
text: `Configured as using non-HTTPS. We might fail on mobile devices.`, text: `Configured as non-HTTPS URI. Be warned that this may not work on mobile devices.`,
}, },
undefined, undefined,
visibleOnly(() => !this.editingSettings.couchDB_URI.startsWith("https://")) visibleOnly(() => !this.editingSettings.couchDB_URI.startsWith("https://"))
@@ -1429,7 +1436,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
paneEl, paneEl,
"div", "div",
{ {
text: `These settings are kept locked while any synchronization options are enabled. Disable these options in the "Sync Settings" tab to unlock.`, text: `These settings are unable to be changed during synchronization. Please disable all syncing in the "Sync Settings" to unlock.`,
}, },
undefined, undefined,
visibleOnly(() => isAnySyncEnabled()) visibleOnly(() => isAnySyncEnabled())
@@ -1457,7 +1464,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
.setName("Test Database Connection") .setName("Test Database Connection")
.setClass("wizardHidden") .setClass("wizardHidden")
.setDesc( .setDesc(
"Open database connection. If the remote database is not found and you have the privilege to create a database, the database will be created." "Open database connection. If the remote database is not found and you have permission to create a database, the database will be created."
) )
.addButton((button) => .addButton((button) =>
button button
@@ -1469,8 +1476,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
); );
new Setting(paneEl) new Setting(paneEl)
.setName("Check and fix database configuration") .setName("Validate Database Configuration")
.setDesc("Check the database configuration, and fix if there are any problems.") .setDesc("Checks and fixes any potential issues with the database config.")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Check") .setButtonText("Check")
@@ -1501,7 +1508,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
new Setting(paneEl).autoWireNumeric("notifyThresholdOfRemoteStorageSize", {}).setClass("wizardHidden"); new Setting(paneEl).autoWireNumeric("notifyThresholdOfRemoteStorageSize", {}).setClass("wizardHidden");
}); });
void addPanel(paneEl, "Confidentiality").then((paneEl) => { void addPanel(paneEl, "Privacy & Encryption").then((paneEl) => {
new Setting(paneEl).autoWireToggle("encrypt", { holdValue: true }); new Setting(paneEl).autoWireToggle("encrypt", { holdValue: true });
const isEncryptEnabled = visibleOnly(() => this.isConfiguredAs("encrypt", true)); const isEncryptEnabled = visibleOnly(() => this.isConfiguredAs("encrypt", true));
@@ -1526,8 +1533,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
void addPanel(paneEl, "Fetch settings").then((paneEl) => { void addPanel(paneEl, "Fetch settings").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setName("Fetch tweaks from the remote") .setName("Fetch config from server")
.setDesc("Fetch other necessary settings from already configured remote.") .setDesc("Fetch necessary settings from already configured server.")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Fetch") .setButtonText("Fetch")
@@ -1563,7 +1570,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
if (isEncryptionFullyEnabled) { if (isEncryptionFullyEnabled) {
if ( if (
(await this.plugin.confirm.askYesNoDialog( (await this.plugin.confirm.askYesNoDialog(
"Enabling End-to-End Encryption and Path Obfuscation is strongly recommended. Do you surely want to continue without encryption?", "We recommend enabling End-To-End Encryption, and Path Obfuscation. Are you sure you want to continue without encryption?",
{ defaultOption: "No", title: "Encryption is not enabled" } { defaultOption: "No", title: "Encryption is not enabled" }
)) == "no" )) == "no"
) { ) {
@@ -1576,8 +1583,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
if (!(await isPassphraseValid())) { if (!(await isPassphraseValid())) {
if ( if (
(await this.plugin.confirm.askYesNoDialog( (await this.plugin.confirm.askYesNoDialog(
"End-to-End encryption seems to have trouble. Do you surely want to continue with the current settings?", "Your encryption passphrase might be invalid. Are you sure you want to continue?",
{ defaultOption: "No", title: "Encryption has some trouble" } { defaultOption: "No", title: "Encryption Passphrase Invalid?" }
)) == "no" )) == "no"
) { ) {
return; return;
@@ -1592,8 +1599,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
} }
if ( if (
(await this.plugin.confirm.askYesNoDialog( (await this.plugin.confirm.askYesNoDialog(
"Do you want to fetch the tweaks from the remote?", "Do you want to fetch the config from the server?",
{ defaultOption: "Yes", title: "Fetch tweaks" } { defaultOption: "Yes", title: "Fetch config" }
)) == "yes" )) == "yes"
) { ) {
const trialSetting = { ...this.initialSettings, ...this.editingSettings }; const trialSetting = { ...this.initialSettings, ...this.editingSettings };
@@ -1702,18 +1709,18 @@ However, your report is needed to stabilise this. I appreciate you for your grea
...this.editingSettings, ...this.editingSettings,
...presetLiveSync, ...presetLiveSync,
}; };
Logger("Synchronization setting configured as LiveSync.", LOG_LEVEL_NOTICE); Logger("Configured synchronization mode: LiveSync", LOG_LEVEL_NOTICE);
} else if (currentPreset == "PERIODIC") { } else if (currentPreset == "PERIODIC") {
this.editingSettings = { this.editingSettings = {
...this.editingSettings, ...this.editingSettings,
...presetPeriodic, ...presetPeriodic,
}; };
Logger( Logger(
"Synchronization setting configured as Periodic sync with batch database update.", "Configured synchronization mode: Periodic",
LOG_LEVEL_NOTICE LOG_LEVEL_NOTICE
); );
} else { } else {
Logger("All synchronizations disabled.", LOG_LEVEL_NOTICE); Logger("Configured synchronization mode: DISABLED", LOG_LEVEL_NOTICE);
this.editingSettings = { this.editingSettings = {
...this.editingSettings, ...this.editingSettings,
...presetAllDisabled, ...presetAllDisabled,
@@ -1731,7 +1738,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
// this.resetEditingSettings(); // this.resetEditingSettings();
if ( if (
(await this.plugin.confirm.askYesNoDialog( (await this.plugin.confirm.askYesNoDialog(
"All done!, do you want to generate a setup URI to set up other devices?", "All done! Do you want to generate a setup URI to set up other devices?",
{ defaultOption: "Yes", title: "Congratulations!" } { defaultOption: "Yes", title: "Congratulations!" }
)) == "yes" )) == "yes"
) { ) {
@@ -1752,7 +1759,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
} }
}); });
}); });
void addPanel(paneEl, "Synchronization Methods").then((paneEl) => { void addPanel(paneEl, "Synchronization Method").then((paneEl) => {
paneEl.addClass("wizardHidden"); paneEl.addClass("wizardHidden");
// const onlyOnLiveSync = visibleOnly(() => this.isConfiguredAs("syncMode", "LIVESYNC")); // const onlyOnLiveSync = visibleOnly(() => this.isConfiguredAs("syncMode", "LIVESYNC"));
@@ -1763,10 +1770,10 @@ However, your report is needed to stabilise this. I appreciate you for your grea
this.editingSettings.remoteType == REMOTE_COUCHDB this.editingSettings.remoteType == REMOTE_COUCHDB
? { ? {
ONEVENTS: "On events", ONEVENTS: "On events",
PERIODIC: "Periodic and On events", PERIODIC: "Periodic and on events",
LIVESYNC: "LiveSync", LIVESYNC: "LiveSync",
} }
: { ONEVENTS: "On events", PERIODIC: "Periodic and On events" }; : { ONEVENTS: "On events", PERIODIC: "Periodic and on events" };
new Setting(paneEl) new Setting(paneEl)
.autoWireDropDown("syncMode", { .autoWireDropDown("syncMode", {
@@ -1852,7 +1859,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
new Setting(paneEl).autoWireToggle("notifyAllSettingSyncFile"); new Setting(paneEl).autoWireToggle("notifyAllSettingSyncFile");
}); });
void addPanel(paneEl, "Hidden files", undefined, undefined, LEVEL_ADVANCED).then((paneEl) => { void addPanel(paneEl, "Hidden Files", undefined, undefined, LEVEL_ADVANCED).then((paneEl) => {
paneEl.addClass("wizardHidden"); paneEl.addClass("wizardHidden");
const LABEL_ENABLED = "🔁 : Enabled"; const LABEL_ENABLED = "🔁 : Enabled";
@@ -2778,7 +2785,7 @@ ${stringifyYaml(pluginConfig)}`;
paneEl, paneEl,
"div", "div",
{ {
text: "To prevent unwanted vault corruption, the remote database has been locked for synchronization, and this device was not marked as 'resolved'. It caused by some operations like this. Re-initialized. Local database initialization should be required. Please back your vault up, reset the local database, and press 'Mark this device as resolved'. This warning kept showing until confirming the device is resolved by the replication.", text: "The remote database is locked for synchronization to prevent vault corruption because this device isn't marked as 'resolved'. Please backup your vault, reset the local database, and select 'Mark this device as resolved'. This warning will persist until the device is confirmed as resolved by replication.",
cls: "op-warn", cls: "op-warn",
}, },
(c) => { (c) => {
@@ -2786,7 +2793,7 @@ ${stringifyYaml(pluginConfig)}`;
c, c,
"button", "button",
{ {
text: "I'm ready, mark this device 'resolved'", text: "I've made a backup, mark this device 'resolved'",
cls: "mod-warning", cls: "mod-warning",
}, },
(e) => { (e) => {
@@ -2830,8 +2837,8 @@ ${stringifyYaml(pluginConfig)}`;
void addPanel(paneEl, "Scram!").then((paneEl) => { void addPanel(paneEl, "Scram!").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setName("Lock remote") .setName("Lock Server")
.setDesc("Lock remote to prevent synchronization with other devices.") .setDesc("Lock the remote server to prevent synchronization with other devices.")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Lock") .setButtonText("Lock")
@@ -2844,7 +2851,7 @@ ${stringifyYaml(pluginConfig)}`;
new Setting(paneEl) new Setting(paneEl)
.setName("Emergency restart") .setName("Emergency restart")
.setDesc("place the flag file to prevent all operation and restart.") .setDesc("Disables all synchronization and restart.")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Flag and restart") .setButtonText("Flag and restart")
@@ -2857,7 +2864,7 @@ ${stringifyYaml(pluginConfig)}`;
); );
}); });
void addPanel(paneEl, "Data-complementary Operations").then((paneEl) => { void addPanel(paneEl, "Syncing").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setName("Resend") .setName("Resend")
.setDesc("Resend all chunks to the remote.") .setDesc("Resend all chunks to the remote.")
@@ -2982,9 +2989,9 @@ ${stringifyYaml(pluginConfig)}`;
}); });
void addPanel(paneEl, "Rebuilding Operations (Remote Only)").then((paneEl) => { void addPanel(paneEl, "Rebuilding Operations (Remote Only)").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setName("Perform compaction") .setName("Perform cleanup")
.setDesc( .setDesc(
"Compaction discards all of Eden in the non-latest revisions, reducing the storage usage. However, this operation requires the same free space on the remote as the current database." "Reduces storage space by discarding all non-latest revisions. This requires the same amount of free space on the remote server and the local client."
) )
.addButton((button) => .addButton((button) =>
button button
@@ -2992,11 +2999,11 @@ ${stringifyYaml(pluginConfig)}`;
.setDisabled(false) .setDisabled(false)
.onClick(async () => { .onClick(async () => {
const replicator = this.plugin.replicator as LiveSyncCouchDBReplicator; const replicator = this.plugin.replicator as LiveSyncCouchDBReplicator;
Logger(`Compaction has been began`, LOG_LEVEL_NOTICE, "compaction"); Logger(`Cleanup has been began`, LOG_LEVEL_NOTICE, "compaction");
if (await replicator.compactRemote(this.editingSettings)) { if (await replicator.compactRemote(this.editingSettings)) {
Logger(`Compaction has been completed!`, LOG_LEVEL_NOTICE, "compaction"); Logger(`Cleanup has been completed!`, LOG_LEVEL_NOTICE, "compaction");
} else { } else {
Logger(`Compaction has been failed!`, LOG_LEVEL_NOTICE, "compaction"); Logger(`Cleanup has been failed!`, LOG_LEVEL_NOTICE, "compaction");
} }
}) })
) )
@@ -3032,7 +3039,7 @@ ${stringifyYaml(pluginConfig)}`;
new Setting(paneEl) new Setting(paneEl)
.setName("Purge all journal counter") .setName("Purge all journal counter")
.setDesc("Purge all sending and downloading cache.") .setDesc("Purge all download/upload cache.")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Reset all") .setButtonText("Reset all")
@@ -3040,14 +3047,14 @@ ${stringifyYaml(pluginConfig)}`;
.setDisabled(false) .setDisabled(false)
.onClick(async () => { .onClick(async () => {
await this.getMinioJournalSyncClient().resetAllCaches(); await this.getMinioJournalSyncClient().resetAllCaches();
Logger(`Journal sending and downloading cache has been cleared.`, LOG_LEVEL_NOTICE); Logger(`Journal download/upload cache has been cleared.`, LOG_LEVEL_NOTICE);
}) })
) )
.addOnUpdate(onlyOnMinIO); .addOnUpdate(onlyOnMinIO);
new Setting(paneEl) new Setting(paneEl)
.setName("Make empty the bucket") .setName("Fresh Start Wipe")
.setDesc("Delete all data on the remote.") .setDesc("Delete all data on the remote server.")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Delete") .setButtonText("Delete")
@@ -3063,18 +3070,18 @@ ${stringifyYaml(pluginConfig)}`;
sentFiles: new Set(), sentFiles: new Set(),
})); }));
await this.resetRemoteBucket(); await this.resetRemoteBucket();
Logger(`the bucket has been cleared.`, LOG_LEVEL_NOTICE); Logger(`Deleted all data on remote server`, LOG_LEVEL_NOTICE);
}) })
) )
.addOnUpdate(onlyOnMinIO); .addOnUpdate(onlyOnMinIO);
}); });
void addPanel(paneEl, "Niches").then((paneEl) => { void addPanel(paneEl, "Deprecated").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setClass("sls-setting-obsolete") .setClass("sls-setting-obsolete")
.setName("(Obsolete) Clean up databases") .setName("Run database cleanup")
.setDesc( .setDesc(
"Delete unused chunks to shrink the database. However, this feature could be not effective in some cases. Please use rebuild everything instead." "Attempt to shrink the database by deleting unused chunks. This may not work consistently. Use the 'Rebuild everything' under Total Overhaul."
) )
.addButton((button) => .addButton((button) =>
button button
@@ -3098,10 +3105,10 @@ ${stringifyYaml(pluginConfig)}`;
}); });
void addPanel(paneEl, "Reset").then((paneEl) => { void addPanel(paneEl, "Reset").then((paneEl) => {
new Setting(paneEl) new Setting(paneEl)
.setName("Discard local database to reset or uninstall Self-hosted LiveSync") .setName("Delete local database to reset or uninstall Self-hosted LiveSync")
.addButton((button) => .addButton((button) =>
button button
.setButtonText("Discard") .setButtonText("Delete")
.setWarning() .setWarning()
.setDisabled(false) .setDisabled(false)
.onClick(async () => { .onClick(async () => {

View File

@@ -45,7 +45,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
name: "Sync Mode", name: "Sync Mode",
}, },
couchDB_URI: { couchDB_URI: {
name: "URI", name: "Server URI",
placeHolder: "https://........", placeHolder: "https://........",
}, },
couchDB_USER: { couchDB_USER: {
@@ -57,30 +57,30 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
desc: "password", desc: "password",
}, },
couchDB_DBNAME: { couchDB_DBNAME: {
name: "Database name", name: "Database Name",
}, },
passphrase: { passphrase: {
name: "Passphrase", name: "Passphrase",
desc: "Encrypting passphrase. If you change the passphrase of an existing database, overwriting the remote database is strongly recommended.", desc: "Encryption phassphrase. If changed, you should overwrite the server's database with the new (encrypted) files.",
}, },
showStatusOnEditor: { showStatusOnEditor: {
name: "Show status inside the editor", name: "Show status inside the editor",
desc: "Reflected after reboot", desc: "Requires restart of Obsidian.",
}, },
showOnlyIconsOnEditor: { showOnlyIconsOnEditor: {
name: "Show status as icons only", name: "Show status as icons only",
}, },
showStatusOnStatusbar: { showStatusOnStatusbar: {
name: "Show status on the status bar", name: "Show status on the status bar",
desc: "Reflected after reboot.", desc: "Requires restart of Obsidian.",
}, },
lessInformationInLog: { lessInformationInLog: {
name: "Show only notifications", name: "Show only notifications",
desc: "Prevent logging and show only notification. Please disable when you report the logs", desc: "Disables logging, only shows notifications. Please disable if you report an issue.",
}, },
showVerboseLog: { showVerboseLog: {
name: "Verbose Log", name: "Verbose Log",
desc: "Show verbose log. Please enable when you report the logs", desc: "Show verbose log. Please enable if you report an issue.",
}, },
hashCacheMaxCount: { hashCacheMaxCount: {
name: "Memory cache size (by total items)", name: "Memory cache size (by total items)",
@@ -105,7 +105,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
syncOnSave: { syncOnSave: {
name: "Sync on Save", name: "Sync on Save",
desc: "When you save a file, sync automatically", desc: "Forces a sync of the file when it's saved.",
}, },
syncOnEditorSave: { syncOnEditorSave: {
name: "Sync on Editor Save", name: "Sync on Editor Save",
@@ -113,11 +113,11 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
syncOnFileOpen: { syncOnFileOpen: {
name: "Sync on File Open", name: "Sync on File Open",
desc: "When you open a file, sync automatically", desc: "Forces the file to be synced when opened.",
}, },
syncOnStart: { syncOnStart: {
name: "Sync on Start", name: "Sync on Startup",
desc: "Start synchronization after launching Obsidian.", desc: "Automatically Sync all files when opening Obsidian.",
}, },
syncAfterMerge: { syncAfterMerge: {
name: "Sync after merging file", name: "Sync after merging file",
@@ -125,28 +125,30 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
trashInsteadDelete: { trashInsteadDelete: {
name: "Use the trash bin", name: "Use the trash bin",
desc: "Do not delete files that are deleted in remote, just move to trash.", desc: "Move remotely deleted files to the trash, instead of deleting.",
}, },
doNotDeleteFolder: { doNotDeleteFolder: {
name: "Keep empty folder", name: "Keep empty folder",
desc: "Normally, a folder is deleted when it becomes empty after a synchronization. Enabling this will prevent it from getting deleted", desc: "Should we keep folders that don't have any files inside?",
}, },
resolveConflictsByNewerFile: { resolveConflictsByNewerFile: {
name: "Always overwrite with a newer file (beta)", name: "(BETA) Always overwrite with a newer file",
desc: "(Def off) Resolve conflicts by newer files automatically.", desc: "Testing only - Resolve file conflicts by syncing newer copies of the file, this can overwrite modified files. Be Warned.",
}, },
checkConflictOnlyOnOpen: { checkConflictOnlyOnOpen: {
name: "Postpone resolution of inactive files", name: "Delay conflict resolution of inactive files",
desc: "Should we only check for conflicts when a file is opened?"
}, },
showMergeDialogOnlyOnActive: { showMergeDialogOnlyOnActive: {
name: "Postpone manual resolution of inactive files", name: "Delay merge conflict prompt for inactive files.",
desc: "Should we prompt you about conflicting files when a file is opened?"
}, },
disableMarkdownAutoMerge: { disableMarkdownAutoMerge: {
name: "Always resolve conflicts manually", name: "Always prompt merge conflicts",
desc: "If this switch is turned on, a merge dialog will be displayed, even if the sensible-merge is possible automatically. (Turn on to previous behavior)", desc: "Should we prompt you for every single merge, even if we can safely merge automatcially?",
}, },
writeDocumentsIfConflicted: { writeDocumentsIfConflicted: {
name: "Always reflect synchronized changes even if the note has a conflict", name: "Sync changes even if the file has a conflict.",
desc: "Turn on to previous behavior", desc: "Turn on to previous behavior",
}, },
syncInternalFilesInterval: { syncInternalFilesInterval: {
@@ -171,11 +173,11 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
ignoreFiles: { ignoreFiles: {
name: "Ignore files", name: "Ignore files",
desc: "We can use multiple ignore files, e.g.) `.gitignore, .dockerignore`", desc: "Comma separated `.gitignore, .dockerignore`",
}, },
batch_size: { batch_size: {
name: "Batch size", name: "Batch size",
desc: "Number of change feed items to process at a time. Defaults to 50. Minimum is 2.", desc: "Number of changes to sync at a time. Defaults to 50. Minimum is 2.",
}, },
batches_limit: { batches_limit: {
name: "Batch limit", name: "Batch limit",
@@ -193,7 +195,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
suspendFileWatching: { suspendFileWatching: {
name: "Suspend file watching", name: "Suspend file watching",
desc: "Stop watching for file change.", desc: "Stop watching for file changes.",
}, },
suspendParseReplicationResult: { suspendParseReplicationResult: {
name: "Suspend database reflecting", name: "Suspend database reflecting",
@@ -259,7 +261,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
useCustomRequestHandler: { useCustomRequestHandler: {
name: "Use Custom HTTP Handler", name: "Use Custom HTTP Handler",
desc: "If your Object Storage could not configured accepting CORS, enable this.", desc: "Enable this if your Object Storage doesn't accept CORS",
}, },
maxChunksInEden: { maxChunksInEden: {
name: "Maximum Incubating Chunks", name: "Maximum Incubating Chunks",
@@ -275,7 +277,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
settingSyncFile: { settingSyncFile: {
name: "Filename", name: "Filename",
desc: "If you set this, all settings are saved in a markdown file. You will be notified when new settings arrive. You can set different files by the platform.", desc: "Save settings to a markdown file. You will be notified when new settings arrive. You can set different files by the platform.",
}, },
preset: { preset: {
name: "Presets", name: "Presets",
@@ -356,7 +358,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
// desc: "Enable advanced mode" // desc: "Enable advanced mode"
}, },
usePowerUserMode: { usePowerUserMode: {
name: "Enable power user features", name: "Enable poweruser features",
// desc: "Enable power user mode", // desc: "Enable power user mode",
// level: LEVEL_ADVANCED // level: LEVEL_ADVANCED
}, },
@@ -365,7 +367,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
}, },
enableDebugTools: { enableDebugTools: {
name: "Enable Developers' Debug Tools.", name: "Enable Developers' Debug Tools.",
desc: "You need a restart to apply this setting.", desc: "Requires restart of Obsidian",
}, },
}; };
function translateInfo(infoSrc: ConfigurationItem | undefined | false) { function translateInfo(infoSrc: ConfigurationItem | undefined | false) {

View File

@@ -20,9 +20,9 @@ export class ModuleLiveSyncMain extends AbstractModule implements ICoreModule {
if (!(await this.core.$everyOnLayoutReady())) return; if (!(await this.core.$everyOnLayoutReady())) return;
eventHub.emitEvent(EVENT_LAYOUT_READY); eventHub.emitEvent(EVENT_LAYOUT_READY);
if (this.settings.suspendFileWatching || this.settings.suspendParseReplicationResult) { if (this.settings.suspendFileWatching || this.settings.suspendParseReplicationResult) {
const ANSWER_KEEP = "Keep this plug-in suspended"; const ANSWER_KEEP = "Keep LiveSync disabled";
const ANSWER_RESUME = "Resume and restart Obsidian"; const ANSWER_RESUME = "Resume and restart Obsidian";
const message = `Self-hosted LiveSync has been configured to ignore some events. Is this intentional for you? const message = `Self-hosted LiveSync has been configured to ignore some events. Is this correct?
| Type | Status | Note | | Type | Status | Note |
|:---:|:---:|---| |:---:|:---:|---|
@@ -58,9 +58,9 @@ Do you want to resume them and restart Obsidian?
fireAndForget(async () => { fireAndForget(async () => {
this._log(`Additional safety scan..`, LOG_LEVEL_VERBOSE); this._log(`Additional safety scan..`, LOG_LEVEL_VERBOSE);
if (!(await this.core.$allScanStat())) { if (!(await this.core.$allScanStat())) {
this._log(`Additional safety scan has been failed on some module`, LOG_LEVEL_NOTICE); this._log(`Additional safety scan has failed on a module`, LOG_LEVEL_NOTICE);
} else { } else {
this._log(`Additional safety scan done`, LOG_LEVEL_VERBOSE); this._log(`Additional safety scan completed`, LOG_LEVEL_VERBOSE);
} }
}); });
} }
@@ -82,7 +82,7 @@ Do you want to resume them and restart Obsidian?
eventHub.emitEvent(EVENT_PLUGIN_LOADED, this.core); eventHub.emitEvent(EVENT_PLUGIN_LOADED, this.core);
this._log("loading plugin"); this._log("loading plugin");
if (!(await this.core.$everyOnloadStart())) { if (!(await this.core.$everyOnloadStart())) {
this._log("Plugin initialising has been cancelled by some module", LOG_LEVEL_NOTICE); this._log("Plugin initialisation was cancelled by a module", LOG_LEVEL_NOTICE);
return; return;
} }
// this.addUIs(); // this.addUIs();
@@ -94,7 +94,7 @@ Do you want to resume them and restart Obsidian?
this._log($f`Self-hosted LiveSync${" v"}${manifestVersion} ${packageVersion}`); this._log($f`Self-hosted LiveSync${" v"}${manifestVersion} ${packageVersion}`);
await this.core.$$loadSettings(); await this.core.$$loadSettings();
if (!(await this.core.$everyOnloadAfterLoadSettings())) { if (!(await this.core.$everyOnloadAfterLoadSettings())) {
this._log("Plugin initialising has been cancelled by some module", LOG_LEVEL_NOTICE); this._log("Plugin initialisation was cancelled by a module", LOG_LEVEL_NOTICE);
return; return;
} }
const lsKey = "obsidian-live-sync-ver" + this.core.$$getVaultName(); const lsKey = "obsidian-live-sync-ver" + this.core.$$getVaultName();
@@ -102,7 +102,7 @@ Do you want to resume them and restart Obsidian?
const lastVersion = ~~(versionNumberString2Number(manifestVersion) / 1000); const lastVersion = ~~(versionNumberString2Number(manifestVersion) / 1000);
if (lastVersion > this.settings.lastReadUpdates && this.settings.isConfigured) { if (lastVersion > this.settings.lastReadUpdates && this.settings.isConfigured) {
this._log($f`You have some unread release notes! Please read them once!`, LOG_LEVEL_NOTICE); this._log($f`LiveSync has updated, please read the changelog!`, LOG_LEVEL_NOTICE);
} }
//@ts-ignore //@ts-ignore
@@ -117,7 +117,7 @@ Do you want to resume them and restart Obsidian?
this.settings.syncOnFileOpen = false; this.settings.syncOnFileOpen = false;
this.settings.syncAfterMerge = false; this.settings.syncAfterMerge = false;
this.settings.periodicReplication = false; this.settings.periodicReplication = false;
this.settings.versionUpFlash = $f`Self-hosted LiveSync has been upgraded and some behaviors have changed incompatibly. All automatic synchronization is now disabled temporary. Ensure that other devices are also upgraded, and enable synchronization again.`; this.settings.versionUpFlash = $f`LiveSync has been updated, In case of breaking updates, all automatic synchronization has been temporarily disabled. Ensure that all devices are up to date before enabling.`;
await this.saveSettings(); await this.saveSettings();
} }
localStorage.setItem(lsKey, `${VER}`); localStorage.setItem(lsKey, `${VER}`);