Skip to content

Commit fc15a82

Browse files
ComputerEliteComputerElite
authored andcommitted
move links to top of tools & options, add uninstall beat saber button
1 parent 4e2cb43 commit fc15a82

File tree

7 files changed

+29
-21
lines changed

7 files changed

+29
-21
lines changed

QuestAppVersionSwitcher/Assets/html/index.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@ <h2>Downloads</h2>
190190
</div>
191191
</div>
192192
<div class="contentItem hidden" id="tools">
193+
<div class="about">
194+
Quest App Version Switcher version <b id="version"></b>
195+
Accessible via browser at:
196+
<div id="ips">
197+
198+
</div>
199+
</div>
193200
<div class="contentHeader">
194201
Tools
195202
<div class="contentHeaderDescription">Useful for troubleshooting and managing your install</div>
@@ -222,6 +229,10 @@ <h2>Downloads</h2>
222229
<div class="button" id="deleteAllMods">Delete all mods</div>
223230
<div class="buttonLabel">Disables and deletes all mods from the currently selected game</div>
224231
</div>
232+
<div class="buttonContainer">
233+
<div class="button" id="uninstallBS">Uninstall Beat Saber</div>
234+
<div class="buttonLabel">Experimental way to fix the ghost Beat Saber issue</div>
235+
</div>
225236
<div id="updateTextBox" class="textBox"></div>
226237

227238
<div class="space">
@@ -281,13 +292,6 @@ <h2>Downloads</h2>
281292
<br>
282293
You can delete backups in the <code>Backup</code> section
283294
</div>
284-
<div class="about">
285-
Quest App Version Switcher version <div id="version" class="inline"></div>
286-
Accessible via browser at:
287-
<div id="ips">
288-
289-
</div>
290-
</div>
291295
</div>
292296
</div>
293297

QuestAppVersionSwitcher/Assets/html/qavs_inject.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ function UpdatePopUps() {
3535
var errors = operations.filter(x => x.type == Error);
3636

3737
var html = `
38-
${queuedMods.length > 0 ? `${queuedMods.length} mods queued<br>` : ``}
39-
${installingMods.length > 0 ? `${installingMods.length} mods installing<br>` : ``}
40-
${downloadingMods.length > 0 ? `${downloadingMods.length} mods downloading<br>` : ``}
41-
${downloadingDependencies.length > 0 ? `${downloadingDependencies.length} dependencies downloading<br>` : ``}
42-
${errors.length > 0 ? `${errors.length} errors, more info in installed mods tab<br>` : ``}
38+
${queuedMods.length > 0 ? `<b>${queuedMods.length}</b> mods queued<br>` : ``}
39+
${installingMods.length > 0 ? `<b>${installingMods.length}</b> mods installing<br>` : ``}
40+
${downloadingMods.length > 0 ? `<b>${downloadingMods.length}</b> mods downloading<br>` : ``}
41+
${downloadingDependencies.length > 0 ? `<b>${downloadingDependencies.length}</b> dependencies downloading<br>` : ``}
42+
${errors.length > 0 ? `<div style="color: #EE0000;"><b>${errors.length}</b> errors, more info in installed mods tab</div><br>` : ``}
4343
`;
44-
if(!html) {
45-
html = "All done!"
46-
} else {
44+
if(html.trim()) {
4745
somethingWasRunning = true
46+
} else {
47+
html = "All done!"
4848
}
4949
qavsPopupContainer.innerHTML = html;
5050
qavsPopupContainer.style.display = somethingWasRunning ? "block" : "none";

QuestAppVersionSwitcher/Assets/html/script.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ function CheckStartParams() {
489489
}
490490
}
491491

492+
document.getElementById("uninstallBS").onclick = () => {
493+
fetch("/api/android/uninstallpackage?package=com.beatgames.beatsaber&force=true", {method: "POST"})
494+
}
495+
492496
var config = {}
493497
var selectedBackup = ""
494498

@@ -561,7 +565,7 @@ function UpdateUI(closeLists = false) {
561565
document.getElementById("version").innerHTML = res.version
562566
document.getElementById("ips").innerHTML = ""
563567
res.browserIPs.forEach(i => {
564-
document.getElementById("ips").innerHTML += i + "<br>"
568+
document.getElementById("ips").innerHTML += "<div style='margin-top: 15px;'><code>" + i + "</code></div>"
565569
})
566570
}))
567571
Array.prototype.forEach.call(document.getElementsByClassName("selectedBackupName"), i => {

QuestAppVersionSwitcher/Assets/html/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ body {
403403
}
404404

405405
.about {
406-
margin-top: 40px;
406+
margin-bottom: 20px;
407407
}
408408

409409
.infiniteList {

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.11.4" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="67">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.11.5" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="68">
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.11.4.0")]
26-
[assembly: AssemblyFileVersion("1.11.4.0")]
25+
[assembly: AssemblyVersion("1.11.5.0")]
26+
[assembly: AssemblyFileVersion("1.11.5.0")]

QuestAppVersionSwitcher/WebServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public void Start()
555555
return true;
556556
}
557557
string package = serverRequest.queryString.Get("package");
558-
if (!AndroidService.IsPackageInstalled(package))
558+
if (!AndroidService.IsPackageInstalled(package) && serverRequest.queryString.Get("force") == null)
559559
{
560560
serverRequest.SendString(GenericResponse.GetResponse("App is already uninstalled", true), "application/json", 230);
561561
return true;

0 commit comments

Comments
 (0)