possibly fixed the auto updater, and fixed the node processes closing

This commit is contained in:
2026-09-01 19:39:27 -07:00
parent 414ef73e1d
commit 769c0dadcd
5 changed files with 90 additions and 37 deletions

View File

@@ -256,24 +256,8 @@
</div>
</div>
</div>
</div>
</div>
<div id="view-error" class="view-state">
<div class="container">
<svg class="icon icon-error" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="7" x2="12" y2="13" />
<circle cx="12" cy="17" r="1" />
</svg>
<h1>Couldn't start Vyla Home</h1>
<p id="error-msg"></p>
<div class="buttons">
<button class="primary" onclick="location.reload()">Try Again</button>
</div>
</div>
</div>
<script type="module">
@@ -581,15 +565,23 @@ void main() {
});
eventApi.listen("error", (e) => {
const data = e.payload || e;
if (data && data.message) {
setStatus(`Error: ${data.message}`, "#ef4444");
}
setStatus("Cleaning up background processes...", "#fca5a5");
try {
const core = window.__TAURI__?.core;
if (core) {
core.invoke("kill_orphans").finally(() => {
setTimeout(() => {
core.invoke("win_close").catch(() => {});
}, 500);
});
}
} catch (err) { }
});
}
btnYes.addEventListener("click", () => {
if (actionsEl) actionsEl.style.display = "none";
if (actionsEl) actionsEl.style.display = "none";
setStatus("Starting update installation...");
fetch("http://127.0.0.1:4891/update/yes", { method: "POST" }).catch(() => { });
});