mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-12 17:25:56 +00:00
run pretty - revert crlf to lf
since most modern ides handle lf on windows fine, and the entire project is in lf already, i'll set this back
This commit is contained in:
@@ -3,5 +3,5 @@
|
||||
"tabWidth": 4,
|
||||
"printWidth": 120,
|
||||
"semi": true,
|
||||
"endOfLine": "crlf"
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
|
||||
@@ -75,10 +75,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
|
||||
const settings = { ...this.settings };
|
||||
settings.deviceAndVaultName = "";
|
||||
if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) {
|
||||
this._log(
|
||||
"Failed to retrieve passphrase. data.json contains unencrypted items!",
|
||||
LOG_LEVEL_NOTICE
|
||||
);
|
||||
this._log("Failed to retrieve passphrase. data.json contains unencrypted items!", LOG_LEVEL_NOTICE);
|
||||
} else {
|
||||
if (
|
||||
settings.couchDB_PASSWORD != "" ||
|
||||
@@ -144,10 +141,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
|
||||
}
|
||||
const passphrase = await this.getPassphrase(settings);
|
||||
if (passphrase === false) {
|
||||
this._log(
|
||||
"No passphrase found for data.json! Verify configuration before syncing.",
|
||||
LOG_LEVEL_URGENT
|
||||
);
|
||||
this._log("No passphrase found for data.json! Verify configuration before syncing.", LOG_LEVEL_URGENT);
|
||||
} else {
|
||||
if (settings.encryptedCouchDBConnection) {
|
||||
const keys = [
|
||||
|
||||
@@ -885,10 +885,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
|
||||
await this.plugin.$allSuspendExtraSync();
|
||||
this.reloadAllSettings();
|
||||
this.editingSettings.isConfigured = true;
|
||||
Logger(
|
||||
"Syncing has been disabled, fetch and re-enabled if desired.",
|
||||
LOG_LEVEL_NOTICE
|
||||
);
|
||||
Logger("Syncing has been disabled, fetch and re-enabled if desired.", LOG_LEVEL_NOTICE);
|
||||
await this.saveAllDirtySettings();
|
||||
this.closeSetting();
|
||||
await delay(2000);
|
||||
@@ -935,14 +932,16 @@ Store only the settings. **Caution: This may lead to data corruption**; database
|
||||
.setName("Manual setup")
|
||||
.setDesc("Not recommended, but useful if you don't have a Setup URI")
|
||||
.addButton((text) => {
|
||||
text.setButtonText("Start").onClick(async () => {
|
||||
await this.enableMinimalSetup();
|
||||
text.setButtonText("Start").onClick(async () => {
|
||||
await this.enableMinimalSetup();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
new Setting(paneEl)
|
||||
.setName("Enable LiveSync")
|
||||
.setDesc("Only enable this after configuring either of the above two options or completing all configuration manually.")
|
||||
.setDesc(
|
||||
"Only enable this after configuring either of the above two options or completing all configuration manually."
|
||||
)
|
||||
.addOnUpdate(visibleOnly(() => !this.isConfiguredAs("isConfigured", true)))
|
||||
.addButton((text) => {
|
||||
text.setButtonText("Enable").onClick(async () => {
|
||||
@@ -967,7 +966,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
|
||||
// await this.plugin.addOnSetup.command_copySetupURI();
|
||||
eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
void addPanel(paneEl, "Reset").then((paneEl) => {
|
||||
new Setting(paneEl)
|
||||
@@ -1717,10 +1716,7 @@ I appreciate you for your great dedication.
|
||||
...this.editingSettings,
|
||||
...presetPeriodic,
|
||||
};
|
||||
Logger(
|
||||
"Configured synchronization mode: Periodic",
|
||||
LOG_LEVEL_NOTICE
|
||||
);
|
||||
Logger("Configured synchronization mode: Periodic", LOG_LEVEL_NOTICE);
|
||||
} else {
|
||||
Logger("Configured synchronization mode: DISABLED", LOG_LEVEL_NOTICE);
|
||||
this.editingSettings = {
|
||||
|
||||
@@ -137,11 +137,11 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
|
||||
},
|
||||
checkConflictOnlyOnOpen: {
|
||||
name: "Delay conflict resolution of inactive files",
|
||||
desc: "Should we only check for conflicts when a file is opened?"
|
||||
desc: "Should we only check for conflicts when a file is opened?",
|
||||
},
|
||||
showMergeDialogOnlyOnActive: {
|
||||
name: "Delay merge conflict prompt for inactive files.",
|
||||
desc: "Should we prompt you about conflicting files when a file is opened?"
|
||||
desc: "Should we prompt you about conflicting files when a file is opened?",
|
||||
},
|
||||
disableMarkdownAutoMerge: {
|
||||
name: "Always prompt merge conflicts",
|
||||
|
||||
Reference in New Issue
Block a user