mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-10 01:31:54 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88ef7c316a |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-livesync",
|
"id": "obsidian-livesync",
|
||||||
"name": "Self-hosted LiveSync",
|
"name": "Self-hosted LiveSync",
|
||||||
"version": "0.8.7",
|
"version": "0.8.8",
|
||||||
"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.8.7",
|
"version": "0.8.8",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.8.7",
|
"version": "0.8.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"diff-match-patch": "^1.0.5",
|
"diff-match-patch": "^1.0.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.8.7",
|
"version": "0.8.8",
|
||||||
"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",
|
||||||
|
|||||||
@@ -707,7 +707,7 @@ export class LocalPouchDB {
|
|||||||
this.openOneshotReplication(
|
this.openOneshotReplication(
|
||||||
setting,
|
setting,
|
||||||
showingNotice,
|
showingNotice,
|
||||||
async (e) => {},
|
async (e) => { },
|
||||||
false,
|
false,
|
||||||
(e) => {
|
(e) => {
|
||||||
if (e === true) res(e);
|
if (e === true) res(e);
|
||||||
@@ -719,7 +719,7 @@ export class LocalPouchDB {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkReplicationConnectivity(setting: RemoteDBSettings, keepAlive: boolean, skipCheck: boolean) {
|
async checkReplicationConnectivity(setting: RemoteDBSettings, keepAlive: boolean, skipCheck: boolean, showResult: boolean) {
|
||||||
if (!this.isReady) {
|
if (!this.isReady) {
|
||||||
Logger("Database is not ready.");
|
Logger("Database is not ready.");
|
||||||
return false;
|
return false;
|
||||||
@@ -742,7 +742,7 @@ export class LocalPouchDB {
|
|||||||
|
|
||||||
const dbret = await connectRemoteCouchDB(uri, auth, setting.disableRequestURI || this.isMobile);
|
const dbret = await connectRemoteCouchDB(uri, auth, setting.disableRequestURI || this.isMobile);
|
||||||
if (typeof dbret === "string") {
|
if (typeof dbret === "string") {
|
||||||
Logger(`could not connect to ${uri}: ${dbret}`, LOG_LEVEL.NOTICE);
|
Logger(`could not connect to ${uri}: ${dbret}`, showResult ? LOG_LEVEL.NOTICE : LOG_LEVEL.INFO);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -855,10 +855,10 @@ export class LocalPouchDB {
|
|||||||
}
|
}
|
||||||
Logger("Oneshot Sync begin...");
|
Logger("Oneshot Sync begin...");
|
||||||
let thisCallback = callbackDone;
|
let thisCallback = callbackDone;
|
||||||
const ret = await this.checkReplicationConnectivity(setting, true, retrying);
|
const ret = await this.checkReplicationConnectivity(setting, true, retrying, showResult);
|
||||||
let notice: WrappedNotice = null;
|
let notice: WrappedNotice = null;
|
||||||
if (ret === false) {
|
if (ret === false) {
|
||||||
Logger("Could not connect to server.", LOG_LEVEL.NOTICE);
|
Logger("Could not connect to server.", showResult ? LOG_LEVEL.NOTICE : LOG_LEVEL.INFO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (showResult) {
|
if (showResult) {
|
||||||
@@ -974,7 +974,7 @@ export class LocalPouchDB {
|
|||||||
false,
|
false,
|
||||||
async () => {
|
async () => {
|
||||||
Logger("LiveSync begin...");
|
Logger("LiveSync begin...");
|
||||||
const ret = await this.checkReplicationConnectivity(setting, true, true);
|
const ret = await this.checkReplicationConnectivity(setting, true, true, showResult);
|
||||||
let notice: WrappedNotice = null;
|
let notice: WrappedNotice = null;
|
||||||
if (ret === false) {
|
if (ret === false) {
|
||||||
Logger("Could not connect to server.", showResult ? LOG_LEVEL.NOTICE : LOG_LEVEL.INFO);
|
Logger("Could not connect to server.", showResult ? LOG_LEVEL.NOTICE : LOG_LEVEL.INFO);
|
||||||
|
|||||||
Reference in New Issue
Block a user