mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
112 lines
4.2 KiB
HTML
112 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdn.metroui.org.ua/v4/css/metro-all.min.css"
|
|
/>
|
|
<meta charset="UTF-8" />
|
|
<title>ArmCord Setup</title>
|
|
<style>
|
|
@import url("css/setup.css");
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<h1 class="logo"></h1>
|
|
<div id="setup">
|
|
<p>Select what kind of setup you want to perform:</p>
|
|
<button id="express" class="center">Express setup</button>
|
|
<button id="full" class="center">Full setup</button>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
|
|
function fade(element) {
|
|
var op = 1; // initial opacity
|
|
var timer = setInterval(function () {
|
|
if (op <= 0.1) {
|
|
clearInterval(timer);
|
|
element.style.display = "none";
|
|
}
|
|
element.style.opacity = op;
|
|
element.style.filter = "alpha(opacity=" + op * 100 + ")";
|
|
op -= op * 0.1;
|
|
}, 50);
|
|
}
|
|
|
|
if (window.navigator.onLine === false) {
|
|
document.getElementById("setup").innerHTML =
|
|
"You appear to be offline. Please connect to the internet and restart ArmCord Setup.";
|
|
} else {
|
|
console.log("Starting ArmCord Setup...");
|
|
document.getElementById("express").addEventListener("click", function () {
|
|
window.armcord.saveSettings(true, "stable", true, "cumcord");
|
|
fade(document.getElementById("setup"));
|
|
setTimeout(function () {
|
|
window.armcord.restart()
|
|
}, 5000);
|
|
})
|
|
document.getElementById("full").addEventListener("click", function () {
|
|
document.getElementById("setup").innerHTML = `
|
|
<p class="text-center setup-ask">Choose your Discord channel/instance:</p>
|
|
<div class="center">
|
|
<select name="channel" id="channel" class="dropdown-button">
|
|
<option value="stable">Stable</option>
|
|
<option value="canary">Canary</option>
|
|
<option value="ptb">PTB</option>
|
|
<option value="foss">Fosscord</option>
|
|
</select>
|
|
</div>
|
|
<p class="text-center setup-ask">Should ArmCord handle client mods installation?</p>
|
|
<div class="center">
|
|
<select name="csp" id="csp" class="dropdown-button">
|
|
<option value="true">Yes</option>
|
|
<option value="false">No</option>
|
|
</select>
|
|
</div>
|
|
<button id="next" class="center">Next</button>
|
|
`;
|
|
document
|
|
.getElementById("next")
|
|
.addEventListener("click", function () {
|
|
var branch = document.getElementById("channel").value;
|
|
var csp = document.getElementById("csp").value;
|
|
if (csp === "true") {
|
|
document.getElementById("setup").innerHTML = `
|
|
<p class="text-center setup-ask">Select a client mod you want to install:</p>
|
|
<div class="center">
|
|
<select name="mod" id="mod" class="dropdown-button">
|
|
<option value="cumcord">Cumcord</option>
|
|
<option value="goosemod">GooseMod</option>
|
|
<option value="flicker">Flicker (Heavily WIP)</option>
|
|
</select>
|
|
</div>
|
|
<p>Why not all of them? Having many client mods at the same time can cause issues. If you really want to do it though, check our documentation ;)</p>
|
|
<button id="next" class="center">Next</button>
|
|
`;
|
|
document
|
|
.getElementById("next")
|
|
.addEventListener("click", function () {
|
|
var mod = document.getElementById("mod").value;
|
|
window.armcord.saveSettings(true, branch, true, mod);
|
|
fade(document.getElementById("setup"));
|
|
setTimeout(function () {
|
|
window.armcord.restart();
|
|
}, 5000);
|
|
});
|
|
} else {
|
|
//saveSettings(customTitlebarSetting: boolean, channelSetting: string, armcordCSPSetting: boolean, modsSetting: string)
|
|
window.armcord.saveSettings(true, branch, true, "none");
|
|
fade(document.getElementById("setup"));
|
|
setTimeout(function () {
|
|
window.armcord.restart()
|
|
}, 5000);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|