armcord/src/content/setup.html

179 lines
8.2 KiB
HTML
Raw Normal View History

2021-12-24 21:56:49 +00:00
<!DOCTYPE html>
<html lang="en">
2022-03-04 17:53:18 +00:00
<head>
<meta charset="UTF-8" />
2022-04-24 12:49:16 +00:00
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2022-03-04 17:53:18 +00:00
<title>ArmCord Setup</title>
<style>
@import url("css/setup.css");
</style>
</head>
<body>
<div class="container">
2022-04-24 12:49:16 +00:00
<div id="warning" class="hidden">
2022-06-12 18:59:59 +00:00
<p id="setup_offline">
You appear to be offline. Please connect to the internet and restart ArmCord Setup.
</p>
2022-04-24 12:49:16 +00:00
</div>
2022-03-04 17:53:18 +00:00
<div id="setup">
<div id="logo" class="hidden"></div>
2022-04-24 12:49:16 +00:00
<div id="page1" class="hidden">
2022-06-12 18:59:59 +00:00
<p id="setup_question1">Select the type of setup you want to perform.</p>
2022-04-24 12:49:16 +00:00
<div id="buttons">
<button id="express" class="center">Express</button>
<button id="full" class="center">Full</button>
</div>
</div>
<div id="page2" class="hidden">
2022-06-12 18:59:59 +00:00
<p class="text-center setup-ask" id="setup_question2">Choose your Discord channel/instance:</p>
2022-04-24 12:49:16 +00:00
<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>
2022-06-12 18:59:59 +00:00
<p class="text-center setup-ask" id="setup_question3">
Should ArmCord handle client mods installation?
</p>
2022-04-24 12:49:16 +00:00
<div class="center">
<select name="csp" id="csp" class="dropdown-button">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
<div id="buttons">
<button id="next" class="center">Next</button>
</div>
</div>
<div id="page3" class="hidden">
2022-06-12 18:59:59 +00:00
<p class="text-center setup-ask" id="setup_question4">Select a client mod you want to install:</p>
2022-04-24 12:49:16 +00:00
<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>
2022-06-12 18:59:59 +00:00
<p class="text-center" id="setup_question4_clientmodnotice">
2022-04-24 12:49:16 +00:00
Why not all of them? Having many client mods at the same time can cause issues. If you really
2022-06-10 21:17:03 +00:00
want to do it though, check our Discord ;)
2022-04-24 12:49:16 +00:00
</p>
<div id="buttons">
<button id="next" class="center">Next</button>
</div>
</div>
2022-03-04 17:53:18 +00:00
</div>
</div>
2022-06-12 18:59:59 +00:00
<script>
async function loadLang() {
document.getElementById("next").innerHTML = await armcord.getLang("next");
document.getElementById("setup_offline").innerHTML = await armcord.getLang("setup_offline");
document.getElementById("setup_question1").innerHTML = await armcord.getLang("setup_question1");
document.getElementById("express").innerHTML = await armcord.getLang("setup_question1_answer1");
document.getElementById("full").innerHTML = await armcord.getLang("setup_question1_answer2");
document.getElementById("setup_question2").innerHTML = await armcord.getLang("setup_question2");
document.getElementById("setup_question3").innerHTML = await armcord.getLang("setup_question3");
document.getElementById("setup_question4").innerHTML = await armcord.getLang("setup_question4");
document.getElementById("setup_question4_clientmodnotice").innerHTML = await armcord.getLang(
"setup_question4_clientmodnotice"
);
//select stuff1
document.getElementById("csp").options[1].text = await armcord.getLang("no");
document.getElementById("csp").options[0].text = await armcord.getLang("yes");
}
loadLang();
</script>
2022-03-04 17:53:18 +00:00
<script>
document.onload = function () {
ipcRenderer.send("win-unmaximize");
};
2022-04-24 12:49:16 +00:00
// Accessors {{{
let options = {};
let logo = document.getElementById("logo");
logo.classList.remove("hidden");
let page1 = document.getElementById("page1");
page1.classList.remove("hidden");
page1.buttons = document.querySelectorAll("#page1 > #buttons > button");
2021-12-24 21:56:49 +00:00
2022-04-24 12:49:16 +00:00
// Connection check
let warning = document.getElementById("warning");
2022-03-04 17:53:18 +00:00
if (window.navigator.onLine === false) {
2022-04-24 12:49:16 +00:00
warning.classList.remove("hidden");
}
let page2 = document.getElementById("page2");
let page3 = document.getElementById("page3");
// }}}
// Express
page1.buttons[0].addEventListener("click", () => {
window.armcordinternal.saveSettings({
windowStyle: "default",
channel: "stable",
armcordCSP: true,
autoLaunch: true,
2022-04-24 12:49:16 +00:00
minimizeToTray: true,
automaticPatches: false,
mods: "cumcord",
inviteWebsocket: true,
2022-06-14 15:02:37 +00:00
performanceMode: "none"
2022-04-24 12:49:16 +00:00
});
setTimeout(() => window.armcordinternal.restart(), 5000);
});
// Full
page1.buttons[1].addEventListener("click", () => {
page1.classList.add("hidden");
page2.classList.remove("hidden");
});
page2.buttons = document.querySelectorAll("#page2 > #buttons > button");
page2.buttons[0].addEventListener("click", () => {
options.channel = document.getElementById("channel").value;
options.csp = document.getElementById("csp").value;
page2.classList.add("hidden");
page3.buttons = document.querySelectorAll("#page3 > #buttons > button");
if (options.csp === "true") {
page3.classList.remove("hidden");
page3.buttons[0].addEventListener("click", () => {
options.mod = document.getElementById("mod").value;
window.armcordinternal.saveSettings({
windowStyle: "default",
channel: options.channel,
armcordCSP: true,
autoLaunch: true,
2022-04-24 12:49:16 +00:00
minimizeToTray: true,
automaticPatches: false,
2022-06-10 18:24:13 +00:00
performanceMode: "none",
2022-04-24 12:49:16 +00:00
mods: options.mod,
2022-06-14 15:02:37 +00:00
inviteWebsocket: true
2022-04-24 12:49:16 +00:00
});
setTimeout(() => window.armcordinternal.restart(), 500);
});
} else {
2022-03-04 17:53:18 +00:00
window.armcordinternal.saveSettings({
windowStyle: "default",
2022-04-24 12:49:16 +00:00
channel: options.channel,
2022-03-04 17:53:18 +00:00
armcordCSP: true,
minimizeToTray: true,
automaticPatches: false,
autoLaunch: true,
2022-04-24 12:49:16 +00:00
mods: "none",
2022-06-10 18:24:13 +00:00
performanceMode: "none",
2022-06-14 15:02:37 +00:00
inviteWebsocket: true
2022-03-04 17:53:18 +00:00
});
2022-04-24 12:49:16 +00:00
setTimeout(() => window.armcordinternal.restart(), 500);
}
});
2022-03-04 17:53:18 +00:00
</script>
</body>
</html>