mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-14 14:17:25 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 76296cc7c2 | |||
| c416f17e81 | |||
| 2c4501fa5f | |||
| eca4d017de |
3
main.js
3
main.js
@@ -376,7 +376,8 @@ async function start() {
|
|||||||
|
|
||||||
let waitLoops = 0;
|
let waitLoops = 0;
|
||||||
while (userDecision === null) {
|
while (userDecision === null) {
|
||||||
if (!tempServer && waitLoops > 400) {
|
if (waitLoops > 24000) {
|
||||||
|
debugLog("Update decision timed out after 10 minutes, defaulting to skip.");
|
||||||
userDecision = false;
|
userDecision = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vyla-home",
|
"name": "vyla-home",
|
||||||
"version": "1.1.38",
|
"version": "1.1.40",
|
||||||
"description": "Vyla Home Desktop App Launcher",
|
"description": "Vyla Home Desktop App Launcher",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -4238,7 +4238,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vyla-home"
|
name = "vyla-home"
|
||||||
version = "1.1.38"
|
version = "1.1.40"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"objc2 0.5.2",
|
"objc2 0.5.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "vyla-home"
|
name = "vyla-home"
|
||||||
version = "1.1.38"
|
version = "1.1.40"
|
||||||
description = "Vyla Home Desktop App Launcher"
|
description = "Vyla Home Desktop App Launcher"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Vyla Home",
|
"productName": "Vyla Home",
|
||||||
"version": "1.1.38",
|
"version": "1.1.40",
|
||||||
"identifier": "com.vyla.home",
|
"identifier": "com.vyla.home",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../ui"
|
"frontendDist": "../ui"
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"withGlobalTauri": true,
|
"withGlobalTauri": true,
|
||||||
"security": {
|
"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": {
|
"bundle": {
|
||||||
@@ -45,4 +45,4 @@
|
|||||||
"../node_modules/**/*"
|
"../node_modules/**/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -516,6 +516,9 @@ void main() {
|
|||||||
const btnYes = document.getElementById("btn-update-yes");
|
const btnYes = document.getElementById("btn-update-yes");
|
||||||
const btnNo = document.getElementById("btn-update-no");
|
const btnNo = document.getElementById("btn-update-no");
|
||||||
|
|
||||||
|
if (actionsEl) actionsEl.style.display = "none";
|
||||||
|
if (progressTrack) progressTrack.style.display = "none";
|
||||||
|
|
||||||
let currentStatusText = "";
|
let currentStatusText = "";
|
||||||
|
|
||||||
function setStatus(text, color = "rgba(255, 255, 255, 0.85)") {
|
function setStatus(text, color = "rgba(255, 255, 255, 0.85)") {
|
||||||
@@ -567,15 +570,15 @@ void main() {
|
|||||||
const data = e.payload || e;
|
const data = e.payload || e;
|
||||||
if (data) {
|
if (data) {
|
||||||
if (progressTrack) progressTrack.style.display = "block";
|
if (progressTrack) progressTrack.style.display = "block";
|
||||||
const percent = data.percent || 0;
|
if (progressFill) progressFill.style.width = "100%";
|
||||||
if (progressFill) progressFill.style.width = percent + "%";
|
if (actionsEl) actionsEl.style.display = "none";
|
||||||
setStatus(`Downloading update (${percent}%)...`);
|
setStatus("Downloading update...");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
eventApi.listen("update-available", (e) => {
|
eventApi.listen("update-available", (e) => {
|
||||||
const data = e.payload || e;
|
const data = e.payload || e;
|
||||||
if (data) {
|
if (data && data.latest) {
|
||||||
if (progressTrack) progressTrack.style.display = "none";
|
if (progressTrack) progressTrack.style.display = "none";
|
||||||
setStatus(`Update Available: ${data.latest} (Current: ${data.current})`);
|
setStatus(`Update Available: ${data.latest} (Current: ${data.current})`);
|
||||||
if (actionsEl) actionsEl.style.display = "flex";
|
if (actionsEl) actionsEl.style.display = "flex";
|
||||||
@@ -602,7 +605,10 @@ void main() {
|
|||||||
btnYes.addEventListener("click", () => {
|
btnYes.addEventListener("click", () => {
|
||||||
if (actionsEl) actionsEl.style.display = "none";
|
if (actionsEl) actionsEl.style.display = "none";
|
||||||
setStatus("Starting update installation...");
|
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", () => {
|
btnNo.addEventListener("click", () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user