Skip to content

Commit

Permalink
Add quest 3 check
Browse files Browse the repository at this point in the history
  • Loading branch information
ComputerElite authored and ComputerElite committed Nov 12, 2023
1 parent 510f62a commit e03d622
Showing 1 changed file with 36 additions and 22 deletions.
58 changes: 36 additions & 22 deletions QuestAppVersionSwitcher/Assets/html/flows/beat_saber_modding.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ <h1>Download is done!</h1>
<h1>It looks like you're offline!</h1>
<p>Please enable WiFi and restart QuestAppVersionSwitcher to continue.</p>
</div>
<div class="content hidden" id="nodowngrade">
<h1>Quest 3 is currently not moddable with QuestAppVersionSwitcher!</h1>
<p>The modding team is working hard to make Quest 3 modding work. In the meantime if you have a PC you can use QuestPatcher to mod your game. Please refer to discord.gg/beatsabermods (Discord Server) for more information.</p>
</div>
<div style="position: fixed; bottom: 10px; left: 10px;">
<button id="showSupportButton" onclick="ShowSupport()">Help</button>
<div id="helpSection" style="display: none;" class="box">
Expand All @@ -138,6 +142,7 @@ <h2>Upload logs</h2>
<code id="logsInfoText" class="hidden">

</code>
<button onclick="window.location = `/setup`">Go back</button>
</div>
</div>
<script>
Expand Down Expand Up @@ -464,35 +469,44 @@ <h2>Upload logs</h2>
}

function FirstOpen() {
UpdateModdedStatus().then(() => {
if(!moddedStatus.isInstalled) {
// Downgrade
OpenTab("downgrade")
CheckDowngrade()
fetch(start + "/api/android/device").then(res => res.json().then(j => {
if(j.device == "eureka") {
// Logged in
OpenTab("nodowngrade")
} else {
UpdateSupportedBeatSaberVersions().then(() => {
if(SupportedBeatSaberVersions.length <= 0) {
// OH NO; USER IS OFFLINE
OpenTab("offline")
} else if(SupportedBeatSaberVersions[0] == moddedStatus.version) {
// Continue with modding

if(moddedStatus.isPatched) {
// Already modded
OpenTab("alreadymodded")
} else {
// Not modded
OpenTab("modgame")
UpdateModGamePage()
}
} else {
// Not logged in
UpdateModdedStatus().then(() => {
if(!moddedStatus.isInstalled) {
// Downgrade
OpenTab("downgrade")
CheckDowngrade()
} else {
UpdateSupportedBeatSaberVersions().then(() => {
if(SupportedBeatSaberVersions.length <= 0) {
// OH NO; USER IS OFFLINE
OpenTab("offline")
} else if(SupportedBeatSaberVersions[0] == moddedStatus.version) {
// Continue with modding

if(moddedStatus.isPatched) {
// Already modded
OpenTab("alreadymodded")
} else {
// Not modded
OpenTab("modgame")
UpdateModGamePage()
}
} else {
// Downgrade
OpenTab("downgrade")
CheckDowngrade()
}
})
}
})
}
})
}))

}

var SupportedBeatSaberVersions = []
Expand Down

0 comments on commit e03d622

Please sign in to comment.