mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
183 lines
8.5 KiB
HTML
183 lines
8.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>ArmCord Setup</title>
|
|
<style>
|
|
@import url("css/setup.css");
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div id="warning" class="hidden">
|
|
<p id="setup_offline">You appear to be offline. Please connect to the internet and restart ArmCord.</p>
|
|
</div>
|
|
<div id="setup">
|
|
<div id="logo" class="hidden"></div>
|
|
<div id="page1" class="hidden">
|
|
<p id="setup_question1">Select the type of setup you want to perform.</p>
|
|
<div id="buttons">
|
|
<button id="express" class="center">Express</button>
|
|
<button id="full" class="center">Full</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="page2" class="hidden">
|
|
<p class="text-center setup-ask" id="setup_question2">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="hummus">Hummus (unofficial)</option>
|
|
</select>
|
|
</div>
|
|
<p class="text-center setup-ask" id="setup_question3">
|
|
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>
|
|
<div id="buttons">
|
|
<button id="next" class="center">Next</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="page3" class="hidden">
|
|
<p class="text-center setup-ask" id="setup_question4">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 class="text-center" id="setup_question4_clientmodnotice">
|
|
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 Discord ;)
|
|
</p>
|
|
<div id="buttons">
|
|
<button id="next" class="center">Next</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<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>
|
|
<script>
|
|
document.onload = function () {
|
|
ipcRenderer.send("win-unmaximize");
|
|
};
|
|
// 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");
|
|
|
|
// Connection check
|
|
let warning = document.getElementById("warning");
|
|
if (window.navigator.onLine === false) {
|
|
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,
|
|
minimizeToTray: true,
|
|
alternativePaste: false,
|
|
automaticPatches: false,
|
|
mods: "cumcord",
|
|
inviteWebsocket: true,
|
|
mobileMode: false,
|
|
trayIcon: "ac_plug_colored",
|
|
performanceMode: "none"
|
|
});
|
|
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,
|
|
minimizeToTray: true,
|
|
mobileMode: false,
|
|
automaticPatches: false,
|
|
performanceMode: "none",
|
|
alternativePaste: false,
|
|
trayIcon: "ac_plug_colored",
|
|
mods: options.mod,
|
|
inviteWebsocket: true
|
|
});
|
|
setTimeout(() => window.armcordinternal.restart(), 500);
|
|
});
|
|
} else {
|
|
window.armcordinternal.saveSettings({
|
|
windowStyle: "default",
|
|
channel: options.channel,
|
|
armcordCSP: true,
|
|
minimizeToTray: true,
|
|
automaticPatches: false,
|
|
mobileMode: false,
|
|
mods: "none",
|
|
alternativePaste: false,
|
|
performanceMode: "none",
|
|
trayIcon: "ac_plug_colored",
|
|
inviteWebsocket: true
|
|
});
|
|
setTimeout(() => window.armcordinternal.restart(), 500);
|
|
}
|
|
});
|
|
document.body.setAttribute("insetup", "");
|
|
</script>
|
|
</body>
|
|
</html>
|