mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-30 18:11:29 +00:00
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:
4
main.ts
4
main.ts
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user