fix global references

This commit is contained in:
vorotamoroz
2026-06-17 05:29:45 +01:00
parent ae9c46f8f0
commit 497fd04081
14 changed files with 479 additions and 42 deletions
@@ -133,7 +133,7 @@ export function paneSetup(
cls: "sls-troubleshoot-preview",
});
const loadMarkdownPage = async (pathAll: string, basePathParam: string = "") => {
troubleShootEl.style.minHeight = troubleShootEl.clientHeight + "px";
troubleShootEl.setCssStyles({ minHeight: troubleShootEl.clientHeight + "px" });
troubleShootEl.empty();
const fullPath = pathAll.startsWith("/") ? pathAll : `${basePathParam}/${pathAll}`;
@@ -201,7 +201,7 @@ export function paneSetup(
});
});
});
troubleShootEl.style.minHeight = "";
troubleShootEl.setCssStyles({ minHeight: "" });
};
void loadMarkdownPage(topPath);
});
@@ -5,6 +5,7 @@ import type { ObsidianLiveSyncSettings } from "@lib/common/types";
import { fireAndForget, parseHeaderValues } from "@lib/common/utils";
import { isCloudantURI } from "@lib/pouchdb/utils_couchdb";
import { generateCredentialObject } from "@lib/replication/httplib";
import { compatGlobal } from "@lib/common/coreEnvFunctions.ts";
export const checkConfig = async (
checkResultDiv: HTMLDivElement | undefined,
@@ -35,7 +36,7 @@ export const checkConfig = async (
const r = await requestToCouchDBWithCredentials(
editingSettings.couchDB_URI,
credential,
window.origin,
compatGlobal.origin,
undefined,
undefined,
undefined,
@@ -218,7 +219,7 @@ export const checkConfig = async (
isSuccessful = false;
}
addResult($msg("obsidianLiveSyncSettingTab.msgConnectionCheck"), ["ob-btn-config-head"]);
addResult($msg("obsidianLiveSyncSettingTab.msgCurrentOrigin", { origin: window.location.origin }));
addResult($msg("obsidianLiveSyncSettingTab.msgCurrentOrigin", { origin: compatGlobal.location.origin }));
// Request header check
const origins = ["app://obsidian.md", "capacitor://localhost", "http://localhost"];