mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-24 07:01:29 +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,
|
"tabWidth": 4,
|
||||||
"printWidth": 120,
|
"printWidth": 120,
|
||||||
"semi": true,
|
"semi": true,
|
||||||
"endOfLine": "crlf"
|
"endOfLine": "lf"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,10 +75,7 @@ export class ModuleObsidianSettings extends AbstractObsidianModule implements IO
|
|||||||
const settings = { ...this.settings };
|
const settings = { ...this.settings };
|
||||||
settings.deviceAndVaultName = "";
|
settings.deviceAndVaultName = "";
|
||||||
if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) {
|
if (this.usedPassphrase == "" && !(await this.getPassphrase(settings))) {
|
||||||
this._log(
|
this._log("Failed to retrieve passphrase. data.json contains unencrypted items!", LOG_LEVEL_NOTICE);
|
||||||
"Failed to retrieve passphrase. data.json contains unencrypted items!",
|
|
||||||
LOG_LEVEL_NOTICE
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
settings.couchDB_PASSWORD != "" ||
|
settings.couchDB_PASSWORD != "" ||
|
||||||
@@ -144,10 +141,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("No passphrase found for data.json! Verify configuration before syncing.", LOG_LEVEL_URGENT);
|
||||||
"No passphrase found for data.json! Verify configuration before syncing.",
|
|
||||||
LOG_LEVEL_URGENT
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
if (settings.encryptedCouchDBConnection) {
|
if (settings.encryptedCouchDBConnection) {
|
||||||
const keys = [
|
const keys = [
|
||||||
|
|||||||
@@ -885,10 +885,7 @@ Store only the settings. **Caution: This may lead to data corruption**; database
|
|||||||
await this.plugin.$allSuspendExtraSync();
|
await this.plugin.$allSuspendExtraSync();
|
||||||
this.reloadAllSettings();
|
this.reloadAllSettings();
|
||||||
this.editingSettings.isConfigured = true;
|
this.editingSettings.isConfigured = true;
|
||||||
Logger(
|
Logger("Syncing has been disabled, fetch and re-enabled if desired.", LOG_LEVEL_NOTICE);
|
||||||
"Syncing has been disabled, fetch and re-enabled if desired.",
|
|
||||||
LOG_LEVEL_NOTICE
|
|
||||||
);
|
|
||||||
await this.saveAllDirtySettings();
|
await this.saveAllDirtySettings();
|
||||||
this.closeSetting();
|
this.closeSetting();
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
@@ -935,14 +932,16 @@ Store only the settings. **Caution: This may lead to data corruption**; database
|
|||||||
.setName("Manual setup")
|
.setName("Manual setup")
|
||||||
.setDesc("Not recommended, but useful if you don't have a Setup URI")
|
.setDesc("Not recommended, but useful if you don't have a Setup URI")
|
||||||
.addButton((text) => {
|
.addButton((text) => {
|
||||||
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")
|
.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)))
|
.addOnUpdate(visibleOnly(() => !this.isConfiguredAs("isConfigured", true)))
|
||||||
.addButton((text) => {
|
.addButton((text) => {
|
||||||
text.setButtonText("Enable").onClick(async () => {
|
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();
|
// await this.plugin.addOnSetup.command_copySetupURI();
|
||||||
eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI);
|
eventHub.emitEvent(EVENT_REQUEST_COPY_SETUP_URI);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
void addPanel(paneEl, "Reset").then((paneEl) => {
|
void addPanel(paneEl, "Reset").then((paneEl) => {
|
||||||
new Setting(paneEl)
|
new Setting(paneEl)
|
||||||
@@ -1717,10 +1716,7 @@ I appreciate you for your great dedication.
|
|||||||
...this.editingSettings,
|
...this.editingSettings,
|
||||||
...presetPeriodic,
|
...presetPeriodic,
|
||||||
};
|
};
|
||||||
Logger(
|
Logger("Configured synchronization mode: Periodic", LOG_LEVEL_NOTICE);
|
||||||
"Configured synchronization mode: Periodic",
|
|
||||||
LOG_LEVEL_NOTICE
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
Logger("Configured synchronization mode: DISABLED", LOG_LEVEL_NOTICE);
|
Logger("Configured synchronization mode: DISABLED", LOG_LEVEL_NOTICE);
|
||||||
this.editingSettings = {
|
this.editingSettings = {
|
||||||
|
|||||||
@@ -137,11 +137,11 @@ export const SettingInformation: Partial<Record<keyof AllSettings, Configuration
|
|||||||
},
|
},
|
||||||
checkConflictOnlyOnOpen: {
|
checkConflictOnlyOnOpen: {
|
||||||
name: "Delay conflict resolution of inactive files",
|
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: {
|
showMergeDialogOnlyOnActive: {
|
||||||
name: "Delay merge conflict prompt for inactive files.",
|
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: {
|
disableMarkdownAutoMerge: {
|
||||||
name: "Always prompt merge conflicts",
|
name: "Always prompt merge conflicts",
|
||||||
|
|||||||
Reference in New Issue
Block a user