feat(web): support context path deployments

This commit is contained in:
t8y2 committed 2026-06-29 09:14:37 +08:00
1 parent 45a60819ca
commit d01ffb0d55
18 files changed
+248 -43

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
import type { SqlFileProgress } from "./tauri";
import { apiUrl } from "@/lib/webPath";
export function listenSqlFileProgressById(executionId: string, handler: (progress: SqlFileProgress) => void): () => void {
const es = new EventSource(`/api/sql-file/progress/${executionId}`);
const es = new EventSource(apiUrl(`/api/sql-file/progress/${executionId}`));
es.onmessage = (e) => {
const progress: SqlFileProgress = JSON.parse(e.data);
handler(progress);