fixes below:

Make text selectable in log dialog.
Dumping errors when couldn't connect
Invalid uri could not detected.
Add tooltips to statusbar
This commit is contained in:
vorotamoroz
2021-11-08 17:52:07 +09:00
parent d324f08240
commit 53b4d4cd20
5 changed files with 8 additions and 5 deletions

View File

@@ -231,7 +231,7 @@ const isValidRemoteCouchDBURI = (uri: string): boolean => {
return false;
};
const connectRemoteCouchDB = async (uri: string, auth: { username: string; password: string }): Promise<false | { db: PouchDB.Database; info: any }> => {
if (!isValidRemoteCouchDBURI(uri)) false;
if (!isValidRemoteCouchDBURI(uri)) return false;
let db = new PouchDB(uri, {
auth,
});
@@ -239,6 +239,7 @@ const connectRemoteCouchDB = async (uri: string, auth: { username: string; passw
let info = await db.info();
return { db: db, info: info };
} catch (ex) {
Logger(ex, LOG_LEVEL.VERBOSE);
return false;
}
};
@@ -1683,6 +1684,7 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
default:
w = "?";
}
this.statusBar.title = this.localDatabase.syncStatus;
this.statusBar.setText(`Sync:${w}${sent}${arrived}`);
}
async replicate(showMessage?: boolean) {

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-livesync",
"name": "Self-hosted LiveSync",
"version": "0.1.10",
"version": "0.1.11",
"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.",
"author": "vorotamoroz",

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "obsidian-livesync",
"version": "0.1.10",
"version": "0.1.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "obsidian-livesync",
"version": "0.1.10",
"version": "0.1.11",
"license": "MIT",
"dependencies": {
"diff-match-patch": "^1.0.5",

View File

@@ -1,6 +1,6 @@
{
"name": "obsidian-livesync",
"version": "0.1.10",
"version": "0.1.11",
"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",
"scripts": {

View File

@@ -14,6 +14,7 @@
overflow-y: scroll;
/* min-height: 280px; */
max-height: 280px;
user-select: text;
}
.op-pre {
white-space: pre-wrap;