diff --git a/main.js b/main.js index ebbd7ed..a03f790 100644 --- a/main.js +++ b/main.js @@ -376,7 +376,8 @@ async function start() { let waitLoops = 0; while (userDecision === null) { - if (!tempServer && waitLoops > 400) { + if (waitLoops > 24000) { + debugLog("Update decision timed out after 10 minutes, defaulting to skip."); userDecision = false; break; } diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 84fa124..d7fdee8 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ "app": { "withGlobalTauri": true, "security": { - "csp": "default-src 'self' http://localhost:4890 http://127.0.0.1:4890; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:4890 http://127.0.0.1:4890 https://esm.sh; style-src 'self' 'unsafe-inline' http://localhost:4890 http://127.0.0.1:4890; img-src 'self' data: https: http://localhost:4890 http://127.0.0.1:4890; font-src 'self' data: http://localhost:4890 http://127.0.0.1:4890; connect-src 'self' http://localhost: http://127.0.0.1:" + "csp": "default-src 'self' http://localhost:4890 http://127.0.0.1:4890; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://localhost:4890 http://127.0.0.1:4890 https://esm.sh; style-src 'self' 'unsafe-inline' http://localhost:4890 http://127.0.0.1:4890; img-src 'self' data: https: http://localhost:4890 http://127.0.0.1:4890; font-src 'self' data: http://localhost:4890 http://127.0.0.1:4890; connect-src 'self' http://localhost:* http://127.0.0.1:*" } }, "bundle": { @@ -45,4 +45,4 @@ "../node_modules/**/*" ] } -} +} \ No newline at end of file diff --git a/ui/index.html b/ui/index.html index 094d612..4805213 100644 --- a/ui/index.html +++ b/ui/index.html @@ -605,7 +605,10 @@ void main() { btnYes.addEventListener("click", () => { if (actionsEl) actionsEl.style.display = "none"; setStatus("Starting update installation..."); - fetch("http://127.0.0.1:4891/update/yes", { method: "POST" }).catch(() => { }); + fetch("http://127.0.0.1:4891/update/yes", { method: "POST" }).catch((err) => { + setStatus("Failed to reach update service. Retrying...", "#fca5a5"); + showDebug(err.message); + }); }); btnNo.addEventListener("click", () => {