2022-02-26 21:26:16 +00:00
<!-- - This is awful and should be replaced in later versions. Possibly based of current settings as of 3.1.0 version. If you have time please PR a better setup screen. - -->
2021-12-24 21:56:49 +00:00
<!DOCTYPE html>
< html lang = "en" >
2021-12-26 21:41:09 +00:00
< 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 >
2021-12-24 21:56:49 +00:00
2021-12-26 21:41:09 +00:00
< 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 >
2022-01-15 21:21:51 +00:00
2021-12-26 21:41:09 +00:00
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);
}
2021-12-24 21:56:49 +00:00
2021-12-26 21:41:09 +00:00
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...");
2022-01-15 21:21:51 +00:00
document.getElementById("express").addEventListener("click", function () {
2022-03-04 16:30:23 +00:00
window.armcordinternal.saveSettings({
windowStyle: "default",
channel: "stable",
armcordCSP: true,
minimizeToTray: true,
automaticPatches: false,
mods: "cumcord",
blurType: "acrylic"
})
2022-01-15 21:21:51 +00:00
fade(document.getElementById("setup"));
setTimeout(function () {
2022-01-30 19:48:32 +00:00
window.armcordinternal.restart()
2022-01-15 21:21:51 +00:00
}, 5000);
})
2021-12-26 21:41:09 +00:00
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 >
2022-01-15 18:31:51 +00:00
< option value = "flicker" > Flicker (Heavily WIP)< / option >
2021-12-26 21:41:09 +00:00
< / 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;
2022-03-04 16:30:23 +00:00
window.armcordinternal.saveSettings({
windowStyle: "default",
channel: branch,
armcordCSP: true,
minimizeToTray: true,
automaticPatches: false,
mods: mod,
blurType: "acrylic"
})
2021-12-26 21:41:09 +00:00
fade(document.getElementById("setup"));
setTimeout(function () {
2022-01-30 19:48:32 +00:00
window.armcordinternal.restart();
2021-12-26 21:41:09 +00:00
}, 5000);
});
} else {
2022-03-04 16:30:23 +00:00
window.armcordinternal.saveSettings({
windowStyle: "default",
channel: branch,
armcordCSP: true,
minimizeToTray: true,
automaticPatches: false,
mods: "none",
blurType: "acrylic"
})
2021-12-26 21:41:09 +00:00
fade(document.getElementById("setup"));
setTimeout(function () {
2022-01-30 19:48:32 +00:00
window.armcordinternal.restart()
2021-12-26 21:41:09 +00:00
}, 5000);
}
});
});
}
< / script >
< / body >
< / html >