mirror of
https://gitlab.com/vyla-entertainment/home.git
synced 2026-11-17 07:37:24 -05:00
ui tweaks
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user