1
0
mirror of https://github.com/vrtmrz/obsidian-livesync.git synced 2025-01-17 18:26:11 +02:00

Fix up wording of messages

This commit is contained in:
Volkor 2024-11-18 21:55:22 +11:00
parent ed5cb3e043
commit 7eceab59af
No known key found for this signature in database
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.value = "";
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 {
this.contentView.setText(`Error occurred.`);
this.contentView.setText(`Error while loading file.`);
Logger(ex, LOG_LEVEL_VERBOSE);
}
}
@ -268,7 +268,7 @@ export class DocumentHistoryModal extends Modal {
const leaf = this.plugin.app.workspace.getLeaf(false);
await leaf.openFile(targetFile);
} 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) => {

View File

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

View File

@ -52,7 +52,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
const passphrase = await this.getPassphrase(settings);
if (passphrase === false) {
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
);
return "";
@ -76,7 +76,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
settings.deviceAndVaultName = "";
if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) {
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
);
} else {
@ -145,7 +145,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
const passphrase = await this.getPassphrase(settings);
if (passphrase === false) {
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
);
} else {
@ -173,7 +173,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
}
} else {
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
);
for (const key of keys) {
@ -189,7 +189,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
settings.passphrase = decrypted;
} else {
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
);
settings.passphrase = "";
@ -220,7 +220,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
}
if (isCloudantURI(this.settings.couchDB_URI) && this.settings.customChunkSize != 0) {
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
);
this.settings.customChunkSize = 0;
@ -228,7 +228,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
this.core.$$setDeviceAndVaultName(localStorage.getItem(lsKey) || "");
if (this.core.$$getDeviceAndVaultName() == "") {
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;
}
}

View File

@ -92,7 +92,7 @@ export class ModuleObsidianSettingsAsMarkdown extends AbstractObsidianModule imp
if (automated && !this.settings.notifyAllSettingSyncFile) {
if (!this.settings.settingSyncFile || this.settings.settingSyncFile != filename) {
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
);
return;

View File

@ -139,11 +139,11 @@ export class ModuleSetupObsidian extends AbstractObsidianModule implements IObsi
newSettingW.encryptedPassphrase = "";
newSettingW.encryptedCouchDBConnection = "";
newSettingW.additionalSuffixOfDatabaseName = `${"appId" in this.app ? this.app.appId : ""}`;
const setupJustImport = "Just import setting";
const setupAsNew = "Set it up as secondary or subsequent device";
const setupAsMerge = "Secondary device but try keeping local changes";
const setupAgain = "Reconfigure and reconstitute the data";
const setupManually = "Leave everything to me";
const setupJustImport = "Don't sync anything, just apply the settings.";
const setupAsNew = "This is a new client - sync everything from the remote server.";
const setupAsMerge = "This is an existing client - merge existing files with the server.";
const setupAgain = "This is a new server - reset remote server and use local files.";
const setupManually = "Continue and configure manually.";
newSettingW.syncInternalFiles = false;
newSettingW.usePluginSync = false;
newSettingW.isConfigured = true;
@ -171,10 +171,10 @@ export class ModuleSetupObsidian extends AbstractObsidianModule implements IObsi
await this.core.rebuilder.$fetchLocal(true);
} else if (setupType == setupAgain) {
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 (
(await this.core.confirm.askSelectStringDialogue(
"Do you really want to do this?",
"Are you sure you want to do this?",
["Cancel", confirm],
{ defaultAction: "Cancel" }
)) != confirm

View File

@ -463,7 +463,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
// And modified.
this.plugin.confirm.askInPopup(
`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.text = "HERE";
anchor.addEventListener("click", () => {
@ -622,7 +622,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
| Symbol | Meaning |
|: ------ :| ------- |
| | Synchronised or well balanced |
| | Up to Date |
| | Synchronise to balance |
| , | Transfer to overwrite |
| , | Transfer to overwrite from other side |
@ -847,7 +847,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
return true;
} else {
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
);
return false;
@ -856,7 +856,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
};
const isPassphraseValid = async () => {
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;
}
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"
) => {
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;
}
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;
}
if (!this.editingSettings.encrypt) {
@ -886,7 +886,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
this.reloadAllSettings();
this.editingSettings.isConfigured = true;
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
);
await this.saveAllDirtySettings();
@ -896,14 +896,14 @@ Store only the settings. **Caution: This may lead to data corruption**; database
};
// 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 tmpDiv = createDiv();
// tmpDiv.addClass("sls-header-button");
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)) {
const informationButtonDiv = informationDivEl.appendChild(tmpDiv);
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 addPanel(paneEl, "Quick Setup").then((paneEl) => {
new Setting(paneEl)
.setName("Use the copied setup URI")
.setDesc("To setup Self-hosted LiveSync, this method is the most preferred one.")
.setName("Connect with Setup URI")
.setDesc("This is the recommended method to set up Self-hosted LiveSync with a Setup URI.")
.addButton((text) => {
text.setButtonText("Use").onClick(() => {
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 () => {
await this.enableMinimalSetup();
});
});
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)))
.addButton((text) => {
text.setButtonText("Enable").onClick(async () => {
@ -954,7 +957,10 @@ Store only the settings. **Caution: This may lead to data corruption**; database
undefined,
visibleOnly(() => this.isConfiguredAs("isConfigured", true))
).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(() => {
// await this.plugin.addOnSetup.command_copySetupURI();
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(
"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"]
);
@ -1191,9 +1197,9 @@ Store only the settings. **Caution: This may lead to data corruption**; database
// Admin check
// for database creation and deletion
if (!(this.editingSettings.couchDB_USER in responseConfig.admins)) {
addResult(`⚠ You do not have administrative privileges.`);
addResult(`⚠ You do not have administrator privileges.`);
} else {
addResult("✔ You have administrative privileges.");
addResult("✔ You have administrator privileges.");
}
// HTTP user-authorization check
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(
"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"]
);
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", {
text: "",
});
const ObjectStorageMessage = `Kindly notice: this is a pretty experimental feature, hence we have some limitations.
- Append only architecture. It will not shrink used storage if we do not perform a rebuild.
const ObjectStorageMessage = `WARNING: This feature is a Work In Progress, so please keep in mind the following:
- Append only architecture. A rebuild is required to shrink the storage.
- 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.
- From the second, we always transfer only differences.
- When first syncing, all history will be transferred from the server. Be mindful of data caps and slow speeds.
- 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(
@ -1408,7 +1415,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
paneEl,
"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,
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,
"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,
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,
"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,
visibleOnly(() => isAnySyncEnabled())
@ -1457,7 +1464,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
.setName("Test Database Connection")
.setClass("wizardHidden")
.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) =>
button
@ -1469,8 +1476,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
);
new Setting(paneEl)
.setName("Check and fix database configuration")
.setDesc("Check the database configuration, and fix if there are any problems.")
.setName("Validate Database Configuration")
.setDesc("Checks and fixes any potential issues with the database config.")
.addButton((button) =>
button
.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");
});
void addPanel(paneEl, "Confidentiality").then((paneEl) => {
void addPanel(paneEl, "Privacy & Encryption").then((paneEl) => {
new Setting(paneEl).autoWireToggle("encrypt", { holdValue: 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) => {
new Setting(paneEl)
.setName("Fetch tweaks from the remote")
.setDesc("Fetch other necessary settings from already configured remote.")
.setName("Fetch config from server")
.setDesc("Fetch necessary settings from already configured server.")
.addButton((button) =>
button
.setButtonText("Fetch")
@ -1563,7 +1570,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
if (isEncryptionFullyEnabled) {
if (
(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" }
)) == "no"
) {
@ -1576,8 +1583,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
if (!(await isPassphraseValid())) {
if (
(await this.plugin.confirm.askYesNoDialog(
"End-to-End encryption seems to have trouble. Do you surely want to continue with the current settings?",
{ defaultOption: "No", title: "Encryption has some trouble" }
"Your encryption passphrase might be invalid. Are you sure you want to continue?",
{ defaultOption: "No", title: "Encryption Passphrase Invalid?" }
)) == "no"
) {
return;
@ -1592,8 +1599,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
}
if (
(await this.plugin.confirm.askYesNoDialog(
"Do you want to fetch the tweaks from the remote?",
{ defaultOption: "Yes", title: "Fetch tweaks" }
"Do you want to fetch the config from the server?",
{ defaultOption: "Yes", title: "Fetch config" }
)) == "yes"
) {
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,
...presetLiveSync,
};
Logger("Synchronization setting configured as LiveSync.", LOG_LEVEL_NOTICE);
Logger("Configured synchronization mode: LiveSync", LOG_LEVEL_NOTICE);
} else if (currentPreset == "PERIODIC") {
this.editingSettings = {
...this.editingSettings,
...presetPeriodic,
};
Logger(
"Synchronization setting configured as Periodic sync with batch database update.",
"Configured synchronization mode: Periodic",
LOG_LEVEL_NOTICE
);
} else {
Logger("All synchronizations disabled.", LOG_LEVEL_NOTICE);
Logger("Configured synchronization mode: DISABLED", LOG_LEVEL_NOTICE);
this.editingSettings = {
...this.editingSettings,
...presetAllDisabled,
@ -1731,7 +1738,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
// this.resetEditingSettings();
if (
(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!" }
)) == "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");
// 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
? {
ONEVENTS: "On events",
PERIODIC: "Periodic and On events",
PERIODIC: "Periodic and on events",
LIVESYNC: "LiveSync",
}
: { ONEVENTS: "On events", PERIODIC: "Periodic and On events" };
: { ONEVENTS: "On events", PERIODIC: "Periodic and on events" };
new Setting(paneEl)
.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");
});
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");
const LABEL_ENABLED = "🔁 : Enabled";
@ -2778,7 +2785,7 @@ ${stringifyYaml(pluginConfig)}`;
paneEl,
"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",
},
(c) => {
@ -2786,7 +2793,7 @@ ${stringifyYaml(pluginConfig)}`;
c,
"button",
{
text: "I'm ready, mark this device 'resolved'",
text: "I've made a backup, mark this device 'resolved'",
cls: "mod-warning",
},
(e) => {
@ -2830,8 +2837,8 @@ ${stringifyYaml(pluginConfig)}`;
void addPanel(paneEl, "Scram!").then((paneEl) => {
new Setting(paneEl)
.setName("Lock remote")
.setDesc("Lock remote to prevent synchronization with other devices.")
.setName("Lock Server")
.setDesc("Lock the remote server to prevent synchronization with other devices.")
.addButton((button) =>
button
.setButtonText("Lock")
@ -2844,7 +2851,7 @@ ${stringifyYaml(pluginConfig)}`;
new Setting(paneEl)
.setName("Emergency restart")
.setDesc("place the flag file to prevent all operation and restart.")
.setDesc("Disables all synchronization and restart.")
.addButton((button) =>
button
.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)
.setName("Resend")
.setDesc("Resend all chunks to the remote.")
@ -2982,9 +2989,9 @@ ${stringifyYaml(pluginConfig)}`;
});
void addPanel(paneEl, "Rebuilding Operations (Remote Only)").then((paneEl) => {
new Setting(paneEl)
.setName("Perform compaction")
.setName("Perform cleanup")
.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) =>
button
@ -2992,11 +2999,11 @@ ${stringifyYaml(pluginConfig)}`;
.setDisabled(false)
.onClick(async () => {
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)) {
Logger(`Compaction has been completed!`, LOG_LEVEL_NOTICE, "compaction");
Logger(`Cleanup has been completed!`, LOG_LEVEL_NOTICE, "compaction");
} 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)
.setName("Purge all journal counter")
.setDesc("Purge all sending and downloading cache.")
.setDesc("Purge all download/upload cache.")
.addButton((button) =>
button
.setButtonText("Reset all")
@ -3040,14 +3047,14 @@ ${stringifyYaml(pluginConfig)}`;
.setDisabled(false)
.onClick(async () => {
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);
new Setting(paneEl)
.setName("Make empty the bucket")
.setDesc("Delete all data on the remote.")
.setName("Fresh Start Wipe")
.setDesc("Delete all data on the remote server.")
.addButton((button) =>
button
.setButtonText("Delete")
@ -3063,18 +3070,18 @@ ${stringifyYaml(pluginConfig)}`;
sentFiles: new Set(),
}));
await this.resetRemoteBucket();
Logger(`the bucket has been cleared.`, LOG_LEVEL_NOTICE);
Logger(`Deleted all data on remote server`, LOG_LEVEL_NOTICE);
})
)
.addOnUpdate(onlyOnMinIO);
});
void addPanel(paneEl, "Niches").then((paneEl) => {
void addPanel(paneEl, "Deprecated").then((paneEl) => {
new Setting(paneEl)
.setClass("sls-setting-obsolete")
.setName("(Obsolete) Clean up databases")
.setName("Run database cleanup")
.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) =>
button
@ -3098,10 +3105,10 @@ ${stringifyYaml(pluginConfig)}`;
});
void addPanel(paneEl, "Reset").then((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) =>
button
.setButtonText("Discard")
.setButtonText("Delete")
.setWarning()
.setDisabled(false)
.onClick(async () => {

View File

@ -45,7 +45,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
name: "Sync Mode",
},
couchDB_URI: {
name: "URI",
name: "Server URI",
placeHolder: "https://........",
},
couchDB_USER: {
@ -57,30 +57,30 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
desc: "password",
},
couchDB_DBNAME: {
name: "Database name",
name: "Database 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: {
name: "Show status inside the editor",
desc: "Reflected after reboot",
desc: "Requires restart of Obsidian.",
},
showOnlyIconsOnEditor: {
name: "Show status as icons only",
},
showStatusOnStatusbar: {
name: "Show status on the status bar",
desc: "Reflected after reboot.",
desc: "Requires restart of Obsidian.",
},
lessInformationInLog: {
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: {
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: {
name: "Memory cache size (by total items)",
@ -105,7 +105,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
syncOnSave: {
name: "Sync on Save",
desc: "When you save a file, sync automatically",
desc: "Forces a sync of the file when it's saved.",
},
syncOnEditorSave: {
name: "Sync on Editor Save",
@ -113,11 +113,11 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
syncOnFileOpen: {
name: "Sync on File Open",
desc: "When you open a file, sync automatically",
desc: "Forces the file to be synced when opened.",
},
syncOnStart: {
name: "Sync on Start",
desc: "Start synchronization after launching Obsidian.",
name: "Sync on Startup",
desc: "Automatically Sync all files when opening Obsidian.",
},
syncAfterMerge: {
name: "Sync after merging file",
@ -125,28 +125,30 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
trashInsteadDelete: {
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: {
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: {
name: "Always overwrite with a newer file (beta)",
desc: "(Def off) Resolve conflicts by newer files automatically.",
name: "(BETA) Always overwrite with a newer file",
desc: "Testing only - Resolve file conflicts by syncing newer copies of the file, this can overwrite modified files. Be Warned.",
},
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: {
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: {
name: "Always resolve conflicts manually",
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)",
name: "Always prompt merge conflicts",
desc: "Should we prompt you for every single merge, even if we can safely merge automatcially?",
},
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",
},
syncInternalFilesInterval: {
@ -171,11 +173,11 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
ignoreFiles: {
name: "Ignore files",
desc: "We can use multiple ignore files, e.g.) `.gitignore, .dockerignore`",
desc: "Comma separated `.gitignore, .dockerignore`",
},
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: {
name: "Batch limit",
@ -193,7 +195,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
suspendFileWatching: {
name: "Suspend file watching",
desc: "Stop watching for file change.",
desc: "Stop watching for file changes.",
},
suspendParseReplicationResult: {
name: "Suspend database reflecting",
@ -259,7 +261,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
useCustomRequestHandler: {
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: {
name: "Maximum Incubating Chunks",
@ -275,7 +277,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
settingSyncFile: {
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: {
name: "Presets",
@ -365,7 +367,7 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
},
enableDebugTools: {
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) {

View File

@ -20,9 +20,9 @@ export class ModuleLiveSyncMain extends AbstractModule implements ICoreModule {
if (!(await this.core.$everyOnLayoutReady())) return;
eventHub.emitEvent(EVENT_LAYOUT_READY);
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 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 |
|:---:|:---:|---|
@ -58,9 +58,9 @@ Do you want to resume them and restart Obsidian?
fireAndForget(async () => {
this._log(`Additional safety scan..`, LOG_LEVEL_VERBOSE);
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 {
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);
this._log("loading plugin");
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;
}
// this.addUIs();
@ -94,7 +94,7 @@ Do you want to resume them and restart Obsidian?
this._log($f`Self-hosted LiveSync${" v"}${manifestVersion} ${packageVersion}`);
await this.core.$$loadSettings();
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;
}
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);
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
@ -117,7 +117,7 @@ Do you want to resume them and restart Obsidian?
this.settings.syncOnFileOpen = false;
this.settings.syncAfterMerge = 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();
}
localStorage.setItem(lsKey, `${VER}`);