Skip to content

Commit c36bf6c

Browse files
ComputerEliteComputerElite
authored andcommitted
fix download progress ui
1 parent f34bd82 commit c36bf6c

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

Assets/html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ <h2>Libraries</h2>
149149
</div>
150150
<div class="contentItem hidden" id="downgrade" style="padding: 0px;">
151151
<b style="font-size: 4em;" id="downgradeLoginMsg">To downgrade you must first log in in the tools & options tab!</b>
152-
<iframe src="https://oculusdb.rui2015.me/search?query=Beat+Saber&headsets=MONTEREY%2CHOLLYWOOD&isqavs=true" style="width: 100%; height: 100%; border: none; overflow-y: visible;"></iframe>
152+
<iframe id="downgradeframe" src="" style="width: 100%; height: 100%; border: none; overflow-y: visible;"></iframe>
153153
</div>
154154
<div class="contentItem hidden" id="download">
155155
<div id="progressBarContainers" style="width: 95%;">

Assets/html/script.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const squareLoader = `
1111
<div class="loaderSquare"></div>
1212
</div>`
1313

14+
document.getElementById("downgradeframe").src = `https://oculusdb.rui2015.me/search?query=Beat+Saber&headsets=MONTEREY%2CHOLLYWOOD${IsOnQuest() ? `&isqavs=true` : ``}`
15+
1416
function IsOnQuest() {
1517
return location.host.startsWith("127.0.0.1")
1618
}
@@ -345,19 +347,19 @@ setInterval(() => {
345347
fetch("/downloads").then(res => {
346348
var m = ""
347349
res.json().then(json => {
348-
json.forEach(d => {
350+
for(const d of json) {
349351
m += `<div class="downloadContainer">
350-
<div class="downloadProgressContainer">
351-
<div class="downloadProgressBar" style="width: ${d.percentage * 100}%;"></div>
352-
</div>
353-
<div class="DownloadText" style="color: ${d.textColor};">
354-
${d.backupName} ${d.percentageString} ${d.doneString} / ${d.totalString} ${d.speedString} ETA ${d.eTAString}
355-
</div>
356-
</div>`
357-
})
352+
<div class="downloadProgressContainer">
353+
<div class="downloadProgressBar" style="width: ${d.percentage * 100}%;"></div>
354+
</div>
355+
<div class="DownloadText" style="color: ${d.textColor};">
356+
${d.backupName} ${d.percentageString} ${d.doneString} / ${d.totalString} ${d.speedString} ETA ${d.eTAString}
357+
</div>
358+
</div>`
359+
}
360+
if (m == "") m = "<h2>No downloads running</h2>"
361+
document.getElementById("progressBarContainers").innerHTML = m
358362
})
359-
if (m == "") m = "<h2>No downloads running</h2>"
360-
document.getElementById("progressBarContainers").innerHTML = m
361363
})
362364
}, 500)
363365

QuestAppVersionSwitcher.csproj.user

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<SelectedDevice>Google Pixel 6</SelectedDevice>
5-
<ActiveDebugProfile>Google Pixel 6</ActiveDebugProfile>
4+
<SelectedDevice>Oculus Quest</SelectedDevice>
5+
<ActiveDebugProfile>Oculus Quest</ActiveDebugProfile>
66
<DefaultDevice>Pixel_5_API_30</DefaultDevice>
77
<AndroidDesignerPreferredTheme>AppTheme</AndroidDesignerPreferredTheme>
88
<AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice>

0 commit comments

Comments
 (0)