armcord/src/settings/settings.html

84 lines
3.5 KiB
HTML
Raw Normal View History

2022-02-26 21:26:16 +00:00
<!DOCTYPE html>
<html lang="en">
2022-03-04 17:53:18 +00:00
<head>
<meta charset="UTF-8" />
<title>ArmCord Settings</title>
<style>
@import url("../content/css/settings.css");
2022-03-04 17:53:18 +00:00
</style>
</head>
2022-02-26 21:26:16 +00:00
2022-03-04 17:53:18 +00:00
<body>
<div class="switch">
<select name="theme" id="theme" class="left">
<option value="default">Default</option>
<option value="native">Native</option>
</select>
<p class="header">ArmCord theme:</p>
</div>
<br />
<div class="switch">
<label class="header">ArmCord CSP</label>
<input class="tgl tgl-light left" id="csp" type="checkbox" />
<label class="tgl-btn left" for="csp"></label>
</div>
<br />
<div class="switch">
<label class="header">Minimize to tray</label>
<input class="tgl tgl-light left" id="tray" type="checkbox" />
<label class="tgl-btn left" for="tray"></label>
</div>
<br />
<div class="switch">
<label class="header">Automatic Patches</label>
<input class="tgl tgl-light left" id="patches" type="checkbox" />
<label class="tgl-btn left" for="patches"></label>
</div>
<div class="switch">
<select name="channel" id="channel" class="left">
<option value="stable">Stable</option>
<option value="canary">Canary</option>
<option value="ptb">PTB</option>
<option value="foss">Fosscord</option>
</select>
<p class="header">Discord channel:</p>
</div>
<div class="switch">
<select name="mod" id="mod" class="left">
<option value="cumcord">Cumcord</option>
<option value="goosemod">GooseMod</option>
<option value="flicker">Flicker</option>
</select>
<p class="header">Client mod:</p>
</div>
2022-03-04 17:53:18 +00:00
<button id="save" class="center">Save settings</button>
</body>
2022-02-26 21:26:16 +00:00
2022-03-04 17:53:18 +00:00
<script>
async function loadSettings() {
document.getElementById("csp").checked = await settings.get("armcordCSP");
document.getElementById("tray").checked = await settings.get("minimizeToTray");
document.getElementById("patches").value = await settings.get("automaticPatches");
document.getElementById("mod").value = await settings.get("mods");
document.getElementById("channel").value = await settings.get("channel");
document.getElementById("theme").value = await settings.get("windowStyle");
}
loadSettings();
document.getElementById("save").addEventListener("click", function () {
//function saveSettings(windowStyle: string, channelSetting: string, armcordCSPSetting: boolean, minimizeToTray: boolean, automaticPatches: boolean,modsSetting: string, blurType: string)
settings.save({
windowStyle: document.getElementById("theme").value,
channel: document.getElementById("channel").value,
armcordCSP: document.getElementById("csp").checked,
minimizeToTray: document.getElementById("tray").checked,
automaticPatches: document.getElementById("patches").checked,
mods: document.getElementById("mod").value,
2022-04-19 17:59:52 +00:00
blurType: "acrylic",
inviteWebsocket: true,
doneSetup: true
});
2022-03-04 17:53:18 +00:00
});
</script>
</html>