Skip to content

Commit fa41afe

Browse files
ComputerEliteComputerElite
authored andcommitted
Add packageName and version to download
1 parent 66251da commit fa41afe

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

QuestAppVersionSwitcher/Assets/html/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ <h2>You can download mods and cosmetics from the following sites. Only QMods are
208208
<div class="button" id="checkUpdate">Check for QuestAppVersionSwitcher updates</div>
209209
<div class="buttonLabel">Checks if updates for QuestAppVersionSwitcher exist</div>
210210
</div>
211+
<div class="buttonContainer">
212+
<div class="button" id="deleteAllMods">Delete all mods</div>
213+
<div class="buttonLabel">Disables and deletes all mods frome the currently selected game</div>
214+
</div>
211215
<div id="updateTextBox" class="textBox"></div>
212216

213217
<div class="space">

QuestAppVersionSwitcher/Assets/html/script.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,31 @@ document.getElementById("grantAccess").onclick = () => {
786786
})
787787
}
788788

789+
document.getElementById("deleteAllMods").onclick = () => {
790+
fetch("deleteallmods").then(res => {
791+
res.text().then(t => {
792+
if(res.status == 200) {
793+
TextBoxGood("updateTextBox", t)
794+
} else {
795+
TextBoxError("updateTextBox", t)
796+
}
797+
})
798+
});
799+
}
800+
/*
801+
document.getElementById("openSettings").onclick = () => {
802+
fetch("opensettings").then(res => {
803+
res.text().then(t => {
804+
if(res.status == 200) {
805+
TextBoxGood("updateTextBox", t)
806+
} else {
807+
TextBoxError("updateTextBox", t)
808+
}
809+
})
810+
});
811+
}
812+
*/
813+
789814
document.getElementById("grantAccess2").onclick = () => {
790815
fetch("grantaccess?package=" + config.currentApp).then(res => {
791816
res.text().then(text => {

QuestAppVersionSwitcher/ClientModels.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public class DownloadRequest
8484

8585
public class DownloadProgress
8686
{
87+
public string packageName { get; set; } = "";
88+
public string version { get; set; } = "";
8789
public double percentage { get; set; } = 0.0;
8890
public string percentageString { get; set; } = "";
8991
public long done { get; set; } = 0;

QuestAppVersionSwitcher/DownloadManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public class DownloadManager : DownloadProgress
2020
public event DownloadFinished DownloadCanceled;
2121
public string tmpPath = "";
2222
public bool isObb = false;
23-
public string packageName = "";
2423
public WebClient downloader = new WebClient();
2524
public bool canceled = false;
2625

@@ -38,6 +37,7 @@ public void StopDownload()
3837
public void StartDownload(string binaryid, string password, string version, string app, string appId, bool isObb, string packageName)
3938
{
4039
this.packageName = packageName;
40+
this.version = version;
4141
this.isObb = isObb;
4242
string decodedToken = PasswordEncryption.Decrypt(CoreService.coreVars.token, password);
4343
downloader = new WebClient();

0 commit comments

Comments
 (0)