mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-13 17:55:56 +00:00
Improved:
- Now using HTTP for the remote database URI warns of an error (on mobile) or notice (on desktop).
This commit is contained in:
@@ -267,6 +267,16 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
const containerRemoteDatabaseEl = containerEl.createDiv();
|
||||
containerRemoteDatabaseEl.createEl("h3", { text: "Remote Database configuration" });
|
||||
const syncWarn = containerRemoteDatabaseEl.createEl("div", { text: `These settings are kept locked while any synchronization options are enabled. Disable these options in the "Sync Settings" tab to unlock.` });
|
||||
if (this.plugin.settings.couchDB_URI.startsWith("http://")) {
|
||||
if (this.plugin.isMobile) {
|
||||
containerRemoteDatabaseEl.createEl("div", { text: `Configured as using plain HTTP. We cannot connect to the remote. Please set up the credentials and use HTTPS for the remote URI.` })
|
||||
.addClass("op-warn");
|
||||
} else {
|
||||
containerRemoteDatabaseEl.createEl("div", { text: `Configured as using plain HTTP. We might fail on mobile devices.` })
|
||||
.addClass("op-warn-info");
|
||||
}
|
||||
}
|
||||
|
||||
syncWarn.addClass("op-warn-info");
|
||||
syncWarn.addClass("sls-hidden");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user