mirror of
https://github.com/Gabi-Zar/Silk-Fly-Launcher.git
synced 2026-04-17 05:26:04 +02:00
Add bepInEx uninstallation
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
</div>
|
||||
<br>
|
||||
<h2>BepInEx</h2>
|
||||
<p class="transparent-text">BepInEx V1.0.0 is installed</p>
|
||||
<p class="transparent-text" id="bepinex-version-text"></p>
|
||||
<div class="horizontal-div">
|
||||
<button class="default-button" onclick="installBepinex()">Install</button>
|
||||
<button class="important-button" onclick="uninstallBepinex()">Uninstall</button>
|
||||
|
||||
@@ -8,6 +8,7 @@ const settingsTemplate = document.getElementById("settings-template");
|
||||
const modTemplate = document.getElementById("mod-template");
|
||||
|
||||
const versionText = HomeTemplate.content.getElementById("version-text");
|
||||
let bepinexVersion
|
||||
|
||||
navigate("home")
|
||||
|
||||
@@ -118,9 +119,21 @@ async function downloadMod() {
|
||||
}
|
||||
|
||||
async function installBepinex() {
|
||||
bepinex.install()
|
||||
bepinexVersion = await bepinex.install()
|
||||
setBepinexVersion()
|
||||
}
|
||||
|
||||
async function uninstallBepinex() {
|
||||
console.log("WIP")
|
||||
bepinexVersion = await bepinex.uninstall()
|
||||
setBepinexVersion()
|
||||
}
|
||||
|
||||
async function setBepinexVersion() {
|
||||
const bepinexVersionText = document.getElementById("bepinex-version-text")
|
||||
if(await bepinexVersion == undefined) {
|
||||
bepinexVersionText.innerText = "BepInEx is not installed"
|
||||
}
|
||||
else {
|
||||
bepinexVersionText.innerText = `BepInEx ${bepinexVersion} is installed`
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user