fix: Desktop app login issues and rename version check and host manager folder

This commit is contained in:
LukeGus
2025-11-01 20:46:40 -05:00
parent 73144fb0a0
commit 994d00e91f
10 changed files with 99 additions and 119 deletions

View File

@@ -484,12 +484,7 @@ function getApiUrl(path: string, defaultPort: number): string {
const devMode = isDev();
const electronMode = isElectron();
if (devMode) {
const protocol = window.location.protocol === "https:" ? "https" : "http";
const sslPort = protocol === "https" ? 8443 : defaultPort;
const url = `${protocol}://${apiHost}:${sslPort}${path}`;
return url;
} else if (electronMode) {
if (electronMode) {
if (configuredServerUrl) {
const baseUrl = configuredServerUrl.replace(/\/$/, "");
const url = `${baseUrl}${path}`;
@@ -497,6 +492,11 @@ function getApiUrl(path: string, defaultPort: number): string {
}
console.warn("Electron mode but no server configured!");
return "http://no-server-configured";
} else if (devMode) {
const protocol = window.location.protocol === "https:" ? "https" : "http";
const sslPort = protocol === "https" ? 8443 : defaultPort;
const url = `${protocol}://${apiHost}:${sslPort}${path}`;
return url;
} else {
return path;
}