Skip to content

Commit abf2018

Browse files
committed
Add quest 3 hint
1 parent 23f0c0d commit abf2018

File tree

5 files changed

+115
-70
lines changed

5 files changed

+115
-70
lines changed

QuestAppVersionSwitcher/Assets/html/flows/beat_saber_modding.html

Lines changed: 43 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,14 @@ <h1>Download is done!</h1>
120120
<h1>It looks like you're offline!</h1>
121121
<p>Please enable WiFi and restart QuestAppVersionSwitcher to continue.</p>
122122
</div>
123-
<div class="content hidden" id="nodowngrade">
124-
<h1>Quest 3 is currently not moddable with QuestAppVersionSwitcher!</h1>
125-
<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>
123+
<div class="content hidden" id="quest3">
124+
<h1>QAVS can currently not manage mods for Quest 3!</h1>
125+
<p>
126+
QAVS downgraded and modded Beat Saber for you. However it can not install mods yet. The modding team is working hard to make that possible.
127+
<br>
128+
To install mods you can install QuestPatcher on your PC or Mac to manage mods.
129+
<br>You can ask for help in the #quest-help channel at discord.gg/beatsabermods (Discord Server).
130+
</p>
126131
</div>
127132
<div style="position: fixed; bottom: 10px; left: 10px;">
128133
<button id="showSupportButton" onclick="ShowSupport()">Help</button>
@@ -171,7 +176,18 @@ <h2>Upload logs</h2>
171176
</div>`
172177

173178
if(tab) {
174-
OpenTab(tab);
179+
if(tab == "afterrestore") {
180+
fetch(start + "/api/android/device").then(res => res.json().then(j => {
181+
if (j.device == "eureka") {
182+
// Logged in
183+
OpenTab("quest3")
184+
} else {
185+
OpenTab(tab)
186+
}
187+
}))
188+
} else {
189+
OpenTab(tab);
190+
}
175191
} else {
176192
FirstOpen()
177193
}
@@ -469,43 +485,36 @@ <h2>Upload logs</h2>
469485
}
470486

471487
function FirstOpen() {
472-
fetch(start + "/api/android/device").then(res => res.json().then(j => {
473-
if(j.device == "eureka") {
474-
// Logged in
475-
OpenTab("nodowngrade")
488+
// Not logged in
489+
UpdateModdedStatus().then(() => {
490+
if(!moddedStatus.isInstalled) {
491+
// Downgrade
492+
OpenTab("downgrade")
493+
CheckDowngrade()
476494
} else {
477-
// Not logged in
478-
UpdateModdedStatus().then(() => {
479-
if(!moddedStatus.isInstalled) {
495+
UpdateSupportedBeatSaberVersions().then(() => {
496+
if(SupportedBeatSaberVersions.length <= 0) {
497+
// OH NO; USER IS OFFLINE
498+
OpenTab("offline")
499+
} else if(SupportedBeatSaberVersions[0] == moddedStatus.version) {
500+
// Continue with modding
501+
502+
if(moddedStatus.isPatched) {
503+
// Already modded
504+
OpenTab("alreadymodded")
505+
} else {
506+
// Not modded
507+
OpenTab("modgame")
508+
UpdateModGamePage()
509+
}
510+
} else {
480511
// Downgrade
481512
OpenTab("downgrade")
482513
CheckDowngrade()
483-
} else {
484-
UpdateSupportedBeatSaberVersions().then(() => {
485-
if(SupportedBeatSaberVersions.length <= 0) {
486-
// OH NO; USER IS OFFLINE
487-
OpenTab("offline")
488-
} else if(SupportedBeatSaberVersions[0] == moddedStatus.version) {
489-
// Continue with modding
490-
491-
if(moddedStatus.isPatched) {
492-
// Already modded
493-
OpenTab("alreadymodded")
494-
} else {
495-
// Not modded
496-
OpenTab("modgame")
497-
UpdateModGamePage()
498-
}
499-
} else {
500-
// Downgrade
501-
OpenTab("downgrade")
502-
CheckDowngrade()
503-
}
504-
})
505514
}
506515
})
507516
}
508-
}))
517+
})
509518

510519
}
511520

QuestAppVersionSwitcher/Assets/html/index.html

Lines changed: 54 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -163,34 +163,45 @@ <h3>Fun (options don't change apk outcome)</h3>
163163

164164
</div>
165165
<div class="contentItem hidden" id="mods">
166-
<b>Please note that mod installation is in early access and there may be issues. If you experience issues please report them on the OculusDB Discord Server at <code>discord.gg/zwRfHQN2UY</code></b>
167-
<div class="button topMargin" onclick="LaunchApp()">Launch Game</div>
168-
<div class="button topButtonMargin" id="installModButton" onclick="UploadMod()">Install a Mod from Disk</div>
169-
<div class="button topButtonMargin" style="font-size: 1.5rem" onclick="OpenTab('getMods')">Get mods</div>
170-
<div id="copyOf"></div>
171-
<div id="operations">
172-
<h2 id="ongoingCount">Ongoing operations:</h2>
173-
<div class="loaderContainer" style="margin-bottom: 10px;">
174-
<div class="loaderBarRight"></div>
175-
<div class="loaderBarLeft"></div>
176-
<div class="loaderBarTop"></div>
177-
<div class="loaderBarBottom"></div>
178-
<div class="loaderSpinningCircle"></div>
179-
<div class="loaderMiddleCircle"></div>
180-
<div class="loaderCircleHole"></div>
181-
<div class="loaderSquare"></div>
182-
</div>
183-
<div class="infiniteList" id="operationsList">
184-
${operations}
185-
</div>
186-
</div>
187-
<h2>Installed Mods</h2>
188-
<div class="infiniteList" id="modsList">
166+
<div class="quest3hide">
167+
<b>Please note that mod installation is in early access and there may be issues. If you experience issues please report them on the OculusDB Discord Server at <code>discord.gg/zwRfHQN2UY</code></b>
168+
<div class="button topMargin" onclick="LaunchApp()">Launch Game</div>
169+
<div class="button topButtonMargin" id="installModButton" onclick="UploadMod()">Install a Mod from Disk</div>
170+
<div class="button topButtonMargin" style="font-size: 1.5rem" onclick="OpenTab('getMods')">Get mods</div>
171+
<div id="copyOf"></div>
172+
<div id="operations">
173+
<h2 id="ongoingCount">Ongoing operations:</h2>
174+
<div class="loaderContainer" style="margin-bottom: 10px;">
175+
<div class="loaderBarRight"></div>
176+
<div class="loaderBarLeft"></div>
177+
<div class="loaderBarTop"></div>
178+
<div class="loaderBarBottom"></div>
179+
<div class="loaderSpinningCircle"></div>
180+
<div class="loaderMiddleCircle"></div>
181+
<div class="loaderCircleHole"></div>
182+
<div class="loaderSquare"></div>
183+
</div>
184+
<div class="infiniteList" id="operationsList">
185+
${operations}
186+
</div>
187+
</div>
188+
<h2>Installed Mods</h2>
189+
<div class="infiniteList" id="modsList">
189190

190-
</div>
191-
<h2>Installed Libraries</h2>
192-
<div class="infiniteList" id="libsList">
191+
</div>
192+
<h2>Installed Libraries</h2>
193+
<div class="infiniteList" id="libsList">
193194

195+
</div>
196+
</div>
197+
<div class="quest3show">
198+
<h1>QAVS can currently not manage mods for Quest 3!</h1>
199+
<p>
200+
QAVS downgraded and modded Beat Saber for you. However it can not install mods yet. The modding team is working hard to make that possible.
201+
<br>
202+
To install mods you can install QuestPatcher on your PC or Mac to manage mods.
203+
<br>You can ask for help in the #quest-help channel at discord.gg/beatsabermods (Discord Server).
204+
</p>
194205
</div>
195206
</div>
196207
<div class="contentItem hidden" id="cosmetics">
@@ -207,11 +218,23 @@ <h2>Cosmetics type</h2>
207218
</div>
208219
</div>
209220
<div class="contentItem hidden" id="getMods">
210-
<h2>You can download mods and cosmetics from the following sites. Only QMods are supported by QuestAppVersionSwitcher + any cosmetics formats of the currently selected game</h2>
211-
<div style="display: flex; flex-direction: column;" class="buttonsContainer">
212-
<div class="button labelMargin" onclick="OpenSite(`https://computerelite.github.io/tools/Beat_Saber/questmods.html?version=${currentGameVersion}&isqavs=true&port=${GetPort()}&ismodded=${isGamePatched}&modloader=${GetModLoaderName()}`)">Open Beat Saber Mods page</div>
213-
<div class="button labelMargin" onclick="OpenSite(`https://computerelite.github.io/tools/Oculus/QAVSHome.html?version=${currentGameVersion}&isqavs=true&port=${GetPort()}&ismodded=${isGamePatched}&modloader=${GetModLoaderName()}`)">Open website hub</div>
214-
<div class="button labelMargin" onclick="OpenSite(`https://www.google.com/search?q=computerelite`)">Open Google</div>
221+
<div class="quest3hide">
222+
<h2>You can download mods and cosmetics from the following sites. Only QMods are supported by QuestAppVersionSwitcher + any cosmetics formats of the currently selected game</h2>
223+
<div style="display: flex; flex-direction: column;" class="buttonsContainer">
224+
<div class="button labelMargin" onclick="OpenSite(`https://computerelite.github.io/tools/Beat_Saber/questmods.html?version=${currentGameVersion}&isqavs=true&port=${GetPort()}&ismodded=${isGamePatched}&modloader=${GetModLoaderName()}`)">Open Beat Saber Mods page</div>
225+
<div class="button labelMargin" onclick="OpenSite(`https://computerelite.github.io/tools/Oculus/QAVSHome.html?version=${currentGameVersion}&isqavs=true&port=${GetPort()}&ismodded=${isGamePatched}&modloader=${GetModLoaderName()}`)">Open website hub</div>
226+
<div class="button labelMargin" onclick="OpenSite(`https://www.google.com/search?q=computerelite`)">Open Google</div>
227+
</div>
228+
229+
</div>
230+
<div class="quest3show">
231+
<h1>QAVS can currently not manage mods for Quest 3!</h1>
232+
<p>
233+
QAVS downgraded and modded Beat Saber for you. However it can not install mods yet. The modding team is working hard to make that possible.
234+
<br>
235+
To install mods you can install QuestPatcher on your PC or Mac to manage mods.
236+
<br>You can ask for help in the #quest-help channel at discord.gg/beatsabermods (Discord Server).
237+
</p>
215238
</div>
216239
</div>
217240

QuestAppVersionSwitcher/Assets/html/script.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,14 @@ function FetchModLoader() {
153153

154154
function UpdateModLoader(data) {
155155
modloader = data.modloader
156+
UpdateInstalledModsQuest3Hint()
156157
if(lastCheckedAccessForGame != config.currentApp) {
157158
lastCheckedAccessForGame = config.currentApp
158159
if(modloader == 0) { // we only need access to android dir for QuestLoader
159160
fetch("/api/gotaccess?package=" + config.currentApp).then(res => {
160161
res.json().then(j => {
161162
if (!j.gotAccess && !params.get("noaccesscheck")) {
162-
// Open need acces prompt
163+
// Open need access prompt
163164
CloseGetPasswordPopup();
164165
OpenRestorePopup();
165166
GotoStep("12")
@@ -275,7 +276,7 @@ function GetPort() {
275276
document.getElementById("cancellogin2").onclick = () => {
276277
CloseGetPasswordPopup()
277278
}
278-
279+
var device = ""
279280
fetch("/api/android/device").then(res => res.json().then(res => {
280281
if(res.sdkVersion <= 29) {
281282
// Android 10 and below don't need new storage perms
@@ -293,8 +294,20 @@ fetch("/api/android/device").then(res => res.json().then(res => {
293294
document.getElementById("installApkFromDisk").style.display = "none"
294295
document.getElementById("splashImageContainer").style.display = "none"
295296
}
297+
device = res.device
298+
UpdateInstalledModsQuest3Hint()
296299
}))
297300

301+
function UpdateInstalledModsQuest3Hint() {
302+
var isOnQuest3 = device == "eureka" && modloader == 0 // only hide mods stuff on QuestLoader
303+
for(const e of document.getElementsByClassName("quest3hide")) {
304+
e.style.display = isOnQuest3 ? "none" : "block"
305+
}
306+
for(const e of document.getElementsByClassName("quest3show")) {
307+
e.style.display = isOnQuest3 ? "block" : "none"
308+
}
309+
}
310+
298311
function LaunchApp() {
299312
fetch("/api/android/launch", {
300313
method: "POST"

QuestAppVersionSwitcher/Properties/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.15.4" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="125">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.15.5" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="126">
33
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="32" />
44
<uses-permission android:name="oculus.permission.handtracking" />
55
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" />

QuestAppVersionSwitcher/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
// Minor Version
2323
// Build Number
2424
// Revision
25-
[assembly: AssemblyVersion("1.15.4.0")]
26-
[assembly: AssemblyFileVersion("1.15.4.0")]
25+
[assembly: AssemblyVersion("1.15.5.0")]
26+
[assembly: AssemblyFileVersion("1.15.5.0")]

0 commit comments

Comments
 (0)