aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/static/main.js
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2021-03-19 21:19:42 -0400
committerMitch Riedstra <mitch@riedstra.us>2021-03-19 21:19:42 -0400
commit0e62a3b46b25e7c101b14ed44235f3c276982fc0 (patch)
treefe37304d6e36dcb5ebe1e921a20795c38d476165 /cmd/web/static/main.js
parent1e435e039d95ad8834dc3f3cd244ff87d5624c73 (diff)
downloadsteam-export-0e62a3b46b25e7c101b14ed44235f3c276982fc0.tar.gz
steam-export-0e62a3b46b25e7c101b14ed44235f3c276982fc0.tar.xz
Sweeping changes to switch to bootstrap and make the UI overall a bit more user friendly
Diffstat (limited to 'cmd/web/static/main.js')
-rw-r--r--cmd/web/static/main.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/cmd/web/static/main.js b/cmd/web/static/main.js
index 55edf0c..b793be4 100644
--- a/cmd/web/static/main.js
+++ b/cmd/web/static/main.js
@@ -22,7 +22,8 @@ function formatDuration(dur) {
}
function setStatus(stat) {
- var elem = document.getElementById("installBar");
+ var barContainer = document.getElementById("installBarContainer");
+ var elem = document.getElementById("installBar");
var msg = document.getElementById("message");
// console.log(stat)
@@ -42,7 +43,9 @@ function setStatus(stat) {
elem.style.width = percent + "%";
elem.innerHTML = percent + "%";
- elem.style.display = "";
+ barContainer.style.display = "";
+
+ elem.ariaValueNow = percent;
// in seconds
var eta = Math.round(((stat.Size - trans)/1024/1024) / rate);
@@ -56,8 +59,11 @@ function setStatus(stat) {
if(!stat.Running && stat.Transferred >= 50 && stat.Error == null) {
elem.style.width = 100 + "%";
elem.innerHTML = 100 + "%";
+ elem.ariaValueNow = 100;
+
msg.innerHTML = "Completed install for: " + stat.Url;
- elem.style.display = "";
+
+ barContainer.style.display = "";
msg.style.display = "";
}
@@ -65,7 +71,7 @@ function setStatus(stat) {
msg.innerHTML = "Errors encountered while installing from: \n\n"
+ stat.Url + "\n\n" +
JSON.stringify(stat.Error, undefined, 2);
- elem.style.display = "hidden";
+ barContainer.style.display = "hidden";
msg.style.display = "";
}
}