feat(web): support context path deployments
This commit is contained in:
1 parent
45a60819ca
commit
d01ffb0d55
18 files changed
+248
-43
No files matched your search
@@ -68,6 +68,7 @@ import { classifyAiSqlExecution } from "@/lib/aiSqlExecutionPolicy";
|
||||
import { buildHistoryAiAnalysisPrompt } from "@/lib/historyAiAnalysis";
|
||||
import { countAvailableAgentDriverUpdates, type AgentDriverUpdateBadgeState } from "@/lib/agentDriverUpdateBadge";
|
||||
import { safeLocalStorageGet, safeLocalStorageSet } from "@/lib/safeStorage";
|
||||
import { apiUrl, webPath } from "@/lib/webPath";
|
||||
import { rankSavedSqlHistory } from "@/lib/savedSqlHistory";
|
||||
import { isSchemaAware, isSingleDatabase, usesTreeSchemaMode } from "@/lib/databaseFeatureSupport";
|
||||
import { codeMirrorSqlDialect, connectionUsesDatabaseObjectTreeMode, effectiveDatabaseTypeForConnection } from "@/lib/jdbcDialect";
|
||||
@@ -1263,7 +1264,7 @@ function onLoginSuccess() {
|
||||
authenticated.value = true;
|
||||
setupRequired.value = false;
|
||||
needsAuth.value = true;
|
||||
window.history.replaceState(null, "", "/");
|
||||
window.history.replaceState(null, "", webPath("/"));
|
||||
initApp();
|
||||
}
|
||||
|
||||
@@ -1386,7 +1387,7 @@ onMounted(async () => {
|
||||
);
|
||||
if (!isDesktop) {
|
||||
try {
|
||||
const res = await fetch("/api/auth/check");
|
||||
const res = await fetch(apiUrl("/api/auth/check"));
|
||||
const data = await res.json();
|
||||
needsAuth.value = data.required;
|
||||
authenticated.value = data.authenticated;
|
||||
@@ -1395,7 +1396,7 @@ onMounted(async () => {
|
||||
/* server unreachable */
|
||||
}
|
||||
if (needsAuth.value && !authenticated.value) {
|
||||
history.replaceState(null, "", "/login");
|
||||
history.replaceState(null, "", webPath("/login"));
|
||||
}
|
||||
if (!setupRequired.value && (!needsAuth.value || authenticated.value)) initApp();
|
||||
api
|
||||
|
||||
Reference in new issue
Block a user