mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-13 21:57:21 -05:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d5e54939a8 | |||
| 76296cc7c2 | |||
| c416f17e81 | |||
| 2c4501fa5f | |||
| eca4d017de |
3
main.js
3
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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vyla-home",
|
||||
"version": "1.1.38",
|
||||
"version": "1.1.41",
|
||||
"description": "Vyla Home Desktop App Launcher",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -4238,7 +4238,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "vyla-home"
|
||||
version = "1.1.38"
|
||||
version = "1.1.41"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"objc2 0.5.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "vyla-home"
|
||||
version = "1.1.38"
|
||||
version = "1.1.41"
|
||||
description = "Vyla Home Desktop App Launcher"
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Vyla Home",
|
||||
"version": "1.1.38",
|
||||
"version": "1.1.41",
|
||||
"identifier": "com.vyla.home",
|
||||
"build": {
|
||||
"frontendDist": "../ui"
|
||||
@@ -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": {
|
||||
|
||||
@@ -516,6 +516,9 @@ void main() {
|
||||
const btnYes = document.getElementById("btn-update-yes");
|
||||
const btnNo = document.getElementById("btn-update-no");
|
||||
|
||||
if (actionsEl) actionsEl.style.display = "none";
|
||||
if (progressTrack) progressTrack.style.display = "none";
|
||||
|
||||
let currentStatusText = "";
|
||||
|
||||
function setStatus(text, color = "rgba(255, 255, 255, 0.85)") {
|
||||
@@ -567,15 +570,15 @@ void main() {
|
||||
const data = e.payload || e;
|
||||
if (data) {
|
||||
if (progressTrack) progressTrack.style.display = "block";
|
||||
const percent = data.percent || 0;
|
||||
if (progressFill) progressFill.style.width = percent + "%";
|
||||
setStatus(`Downloading update (${percent}%)...`);
|
||||
if (progressFill) progressFill.style.width = "100%";
|
||||
if (actionsEl) actionsEl.style.display = "none";
|
||||
setStatus("Downloading update...");
|
||||
}
|
||||
});
|
||||
|
||||
eventApi.listen("update-available", (e) => {
|
||||
const data = e.payload || e;
|
||||
if (data) {
|
||||
if (data && data.latest) {
|
||||
if (progressTrack) progressTrack.style.display = "none";
|
||||
setStatus(`Update Available: ${data.latest} (Current: ${data.current})`);
|
||||
if (actionsEl) actionsEl.style.display = "flex";
|
||||
@@ -602,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", () => {
|
||||
|
||||
Reference in New Issue
Block a user