mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-20 22:31:44 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd722b1fe5 | ||
|
|
0bf087dba0 | ||
|
|
3a4b59b998 | ||
|
|
8fc9d51c45 |
@@ -14,6 +14,8 @@
|
|||||||
- [Why are the logs volatile and ephemeral?](#why-are-the-logs-volatile-and-ephemeral)
|
- [Why are the logs volatile and ephemeral?](#why-are-the-logs-volatile-and-ephemeral)
|
||||||
- [Some network logs are not written into the file.](#some-network-logs-are-not-written-into-the-file)
|
- [Some network logs are not written into the file.](#some-network-logs-are-not-written-into-the-file)
|
||||||
- [If a file were deleted or trimmed, the capacity of the database should be reduced, right?](#if-a-file-were-deleted-or-trimmed-the-capacity-of-the-database-should-be-reduced-right)
|
- [If a file were deleted or trimmed, the capacity of the database should be reduced, right?](#if-a-file-were-deleted-or-trimmed-the-capacity-of-the-database-should-be-reduced-right)
|
||||||
|
- [How can I use the DevTools?](#how-can-i-use-the-devtools)
|
||||||
|
- [Checking the network log](#checking-the-network-log)
|
||||||
- [Troubleshooting](#troubleshooting)
|
- [Troubleshooting](#troubleshooting)
|
||||||
- [On the mobile device, cannot synchronise on the local network!](#on-the-mobile-device-cannot-synchronise-on-the-local-network)
|
- [On the mobile device, cannot synchronise on the local network!](#on-the-mobile-device-cannot-synchronise-on-the-local-network)
|
||||||
- [I think that something bad happening on the vault...](#i-think-that-something-bad-happening-on-the-vault)
|
- [I think that something bad happening on the vault...](#i-think-that-something-bad-happening-on-the-vault)
|
||||||
@@ -77,7 +79,7 @@ However, the logs would not be kept so long and cleared when restarted. If you w
|
|||||||
To avoid unexpected exposure to our confidential things.
|
To avoid unexpected exposure to our confidential things.
|
||||||
|
|
||||||
### Some network logs are not written into the file.
|
### Some network logs are not written into the file.
|
||||||
Especially the CORS error will be reported as a general error to the plug-in for security reasons. So we cannot detect and log it.
|
Especially the CORS error will be reported as a general error to the plug-in for security reasons. So we cannot detect and log it. We are only able to investigate them by [Checking the network log](#checking-the-network-log).
|
||||||
|
|
||||||
### If a file were deleted or trimmed, the capacity of the database should be reduced, right?
|
### If a file were deleted or trimmed, the capacity of the database should be reduced, right?
|
||||||
No, even though if files were deleted, chunks were not deleted.
|
No, even though if files were deleted, chunks were not deleted.
|
||||||
@@ -87,7 +89,15 @@ And one more thing, we can handle the conflicts on any device even though it has
|
|||||||
|
|
||||||
To shrink the database size, `Rebuild everything` only reliably and effectively. But do not worry, if we have synchronised well. We have the actual and real files. Only it takes a bit of time and traffics.
|
To shrink the database size, `Rebuild everything` only reliably and effectively. But do not worry, if we have synchronised well. We have the actual and real files. Only it takes a bit of time and traffics.
|
||||||
|
|
||||||
<!-- Add here -->
|
### How can I use the DevTools?
|
||||||
|
|
||||||
|
#### Checking the network log
|
||||||
|
1. Open the network pane.
|
||||||
|
2. Find the requests marked in red.
|
||||||
|

|
||||||
|
3. Capture the `Headers`, `Payload`, and, `Response`. **Please be sure to keep important information confidential**. If the `Response` contains secrets, you can omitted that.
|
||||||
|
Note: Headers contains a some credentials. **The path of the request URL, Remote Address, authority, and authorization must be concealed.**
|
||||||
|

|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
<!-- Add here -->
|
<!-- Add here -->
|
||||||
|
|||||||
BIN
images/devtools1.png
Normal file
BIN
images/devtools1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
images/devtools2.png
Normal file
BIN
images/devtools2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-livesync",
|
"id": "obsidian-livesync",
|
||||||
"name": "Self-hosted LiveSync",
|
"name": "Self-hosted LiveSync",
|
||||||
"version": "0.23.8",
|
"version": "0.23.9",
|
||||||
"minAppVersion": "0.9.12",
|
"minAppVersion": "0.9.12",
|
||||||
"description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
"description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
||||||
"author": "vorotamoroz",
|
"author": "vorotamoroz",
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.23.8",
|
"version": "0.23.9",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.23.8",
|
"version": "0.23.9",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.556.0",
|
"@aws-sdk/client-s3": "^3.556.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.23.8",
|
"version": "0.23.9",
|
||||||
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
2
src/lib
2
src/lib
Submodule src/lib updated: ed85f79cf7...302a2e7c0b
@@ -1439,7 +1439,7 @@ We can perform a command in this file.
|
|||||||
this.replicator.openReplication(this.settings, true, false, false);
|
this.replicator.openReplication(this.settings, true, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.settings.syncOnStart) {
|
if (!this.settings.liveSync && this.settings.syncOnStart) {
|
||||||
this.replicator.openReplication(this.settings, false, false, false);
|
this.replicator.openReplication(this.settings, false, false, false);
|
||||||
}
|
}
|
||||||
this.periodicSyncProcessor.enable(this.settings.periodicReplication ? this.settings.periodicReplicationInterval * 1000 : 0);
|
this.periodicSyncProcessor.enable(this.settings.periodicReplication ? this.settings.periodicReplicationInterval * 1000 : 0);
|
||||||
|
|||||||
@@ -437,12 +437,17 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
|||||||
localStorage.setItem("ls-setting-passphrase", this.editingSettings?.[key] ?? "");
|
localStorage.setItem("ls-setting-passphrase", this.editingSettings?.[key] ?? "");
|
||||||
return await Promise.resolve();
|
return await Promise.resolve();
|
||||||
}
|
}
|
||||||
|
if (key == "deviceAndVaultName") {
|
||||||
|
this.plugin.deviceAndVaultName = this.editingSettings?.[key];
|
||||||
|
return await Promise.resolve();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Apply and save setting to the plug-in.
|
* Apply and save setting to the plug-in.
|
||||||
* @param keys setting keys for applying
|
* @param keys setting keys for applying
|
||||||
*/
|
*/
|
||||||
async saveSettings(keys: (AllSettingItemKey)[]) {
|
async saveSettings(keys: (AllSettingItemKey)[]) {
|
||||||
|
let hasChanged = false;
|
||||||
const appliedKeys = [] as AllSettingItemKey[];
|
const appliedKeys = [] as AllSettingItemKey[];
|
||||||
for (const k of keys) {
|
for (const k of keys) {
|
||||||
if (!this.isDirty(k)) continue;
|
if (!this.isDirty(k)) continue;
|
||||||
@@ -457,9 +462,12 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
|||||||
this.plugin.settings[k] = this.editingSettings[k];
|
this.plugin.settings[k] = this.editingSettings[k];
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
this.initialSettings[k] = this.plugin.settings[k];
|
this.initialSettings[k] = this.plugin.settings[k];
|
||||||
|
hasChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.plugin.saveSettings();
|
if (hasChanged) {
|
||||||
|
await this.plugin.saveSettings();
|
||||||
|
}
|
||||||
|
|
||||||
// if (runOnSaved) {
|
// if (runOnSaved) {
|
||||||
const handlers =
|
const handlers =
|
||||||
@@ -498,6 +506,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
|||||||
const ret = { ...OnDialogSettingsDefault };
|
const ret = { ...OnDialogSettingsDefault };
|
||||||
ret.configPassphrase = localStorage.getItem("ls-setting-passphrase") || "";
|
ret.configPassphrase = localStorage.getItem("ls-setting-passphrase") || "";
|
||||||
ret.preset = ""
|
ret.preset = ""
|
||||||
|
ret.deviceAndVaultName = this.plugin.deviceAndVaultName;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
computeAllLocalSettings(): Partial<OnDialogSettings> {
|
computeAllLocalSettings(): Partial<OnDialogSettings> {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export type OnDialogSettings = {
|
|||||||
preset: "" | "PERIODIC" | "LIVESYNC" | "DISABLE",
|
preset: "" | "PERIODIC" | "LIVESYNC" | "DISABLE",
|
||||||
syncMode: "ONEVENTS" | "PERIODIC" | "LIVESYNC"
|
syncMode: "ONEVENTS" | "PERIODIC" | "LIVESYNC"
|
||||||
dummy: number,
|
dummy: number,
|
||||||
|
deviceAndVaultName: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const OnDialogSettingsDefault: OnDialogSettings = {
|
export const OnDialogSettingsDefault: OnDialogSettings = {
|
||||||
@@ -13,6 +14,7 @@ export const OnDialogSettingsDefault: OnDialogSettings = {
|
|||||||
preset: "",
|
preset: "",
|
||||||
syncMode: "ONEVENTS",
|
syncMode: "ONEVENTS",
|
||||||
dummy: 0,
|
dummy: 0,
|
||||||
|
deviceAndVaultName: "",
|
||||||
}
|
}
|
||||||
export const AllSettingDefault =
|
export const AllSettingDefault =
|
||||||
{ ...DEFAULT_SETTINGS, ...OnDialogSettingsDefault }
|
{ ...DEFAULT_SETTINGS, ...OnDialogSettingsDefault }
|
||||||
|
|||||||
20
updates.md
20
updates.md
@@ -18,6 +18,10 @@ I have a lot of respect for that plugin, even though it is sometimes treated as
|
|||||||
Hooray for open source, and generous licences, and the sharing of knowledge by experts.
|
Hooray for open source, and generous licences, and the sharing of knowledge by experts.
|
||||||
|
|
||||||
#### Version history
|
#### Version history
|
||||||
|
- 0.23.9
|
||||||
|
- Fixed:
|
||||||
|
- No longer unexpected parallel replication is performed.
|
||||||
|
- Now we can set the device name and enable customised synchronisation again.
|
||||||
- 0.23.8
|
- 0.23.8
|
||||||
- New feature:
|
- New feature:
|
||||||
- Now we are ready for i18n.
|
- Now we are ready for i18n.
|
||||||
@@ -45,21 +49,5 @@ Hooray for open source, and generous licences, and the sharing of knowledge by e
|
|||||||
- Some trivial issues have been fixed.
|
- Some trivial issues have been fixed.
|
||||||
- New feature:
|
- New feature:
|
||||||
- Reloading Obsidian can be scheduled until that file and database operations are stable.
|
- Reloading Obsidian can be scheduled until that file and database operations are stable.
|
||||||
- 0.23.6:
|
|
||||||
- Fixed:
|
|
||||||
- Now the remote chunks could be decrypted even if we are using `Incubate chunks in Document`. (The note of 0.23.6 has been fixed).
|
|
||||||
- Chunk retrieving with `Incubate chunks in document` got more efficiently.
|
|
||||||
- No longer task processor misses the completed tasks.
|
|
||||||
- Replication is no longer started automatically during changes in window visibility (e.g., task switching on the desktop) when off-focused.
|
|
||||||
- 0.23.5:
|
|
||||||
- New feature:
|
|
||||||
- Now we can check configuration mismatching between clients before synchronisation.
|
|
||||||
- Default: enabled / Preferred: enabled / We can disable this by the `Do not check configuration mismatch before replication` toggle in the `Hatch` pane.
|
|
||||||
- It detects configuration mismatches and prevents synchronisation failures and wasted storage.
|
|
||||||
- Now we can perform remote database compaction from the `Maintenance` pane.
|
|
||||||
- Fixed:
|
|
||||||
- We can detect the bucket could not be reachable.
|
|
||||||
- Note:
|
|
||||||
- Known inexplicable behaviour: Recently, (Maybe while enabling `Incubate chunks in Document` and `Fetch chunks on demand` or some more toggles), our customisation sync data is sometimes corrupted. It will be addressed by the next release.
|
|
||||||
|
|
||||||
Older notes is in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md).
|
Older notes is in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md).
|
||||||
@@ -18,6 +18,22 @@ I have a lot of respect for that plugin, even though it is sometimes treated as
|
|||||||
Hooray for open source, and generous licences, and the sharing of knowledge by experts.
|
Hooray for open source, and generous licences, and the sharing of knowledge by experts.
|
||||||
|
|
||||||
#### Version history
|
#### Version history
|
||||||
|
- 0.23.6:
|
||||||
|
- Fixed:
|
||||||
|
- Now the remote chunks could be decrypted even if we are using `Incubate chunks in Document`. (The note of 0.23.6 has been fixed).
|
||||||
|
- Chunk retrieving with `Incubate chunks in document` got more efficiently.
|
||||||
|
- No longer task processor misses the completed tasks.
|
||||||
|
- Replication is no longer started automatically during changes in window visibility (e.g., task switching on the desktop) when off-focused.
|
||||||
|
- 0.23.5:
|
||||||
|
- New feature:
|
||||||
|
- Now we can check configuration mismatching between clients before synchronisation.
|
||||||
|
- Default: enabled / Preferred: enabled / We can disable this by the `Do not check configuration mismatch before replication` toggle in the `Hatch` pane.
|
||||||
|
- It detects configuration mismatches and prevents synchronisation failures and wasted storage.
|
||||||
|
- Now we can perform remote database compaction from the `Maintenance` pane.
|
||||||
|
- Fixed:
|
||||||
|
- We can detect the bucket could not be reachable.
|
||||||
|
- Note:
|
||||||
|
- Known inexplicable behaviour: Recently, (Maybe while enabling `Incubate chunks in Document` and `Fetch chunks on demand` or some more toggles), our customisation sync data is sometimes corrupted. It will be addressed by the next release.
|
||||||
- 0.23.4
|
- 0.23.4
|
||||||
- Fixed:
|
- Fixed:
|
||||||
- No longer experimental configuration is shown on the Minimal Setup.
|
- No longer experimental configuration is shown on the Minimal Setup.
|
||||||
|
|||||||
Reference in New Issue
Block a user