ui tweaks

This commit is contained in:
2026-09-26 11:49:14 -07:00
parent eca4d017de
commit 2c4501fa5f

View File

@@ -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";