mirror of
https://github.com/smartfrigde/armcord.git
synced 2024-08-14 23:56:58 +00:00
268 lines
12 KiB
HTML
268 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<style>
|
|
@import url("../content/css/settings.css");
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="saveBar">
|
|
<button data-string="settings-save" class="center" onclick="saveSettings()"></button>
|
|
</div>
|
|
|
|
<div class="restartBar">
|
|
<button data-string="settings-restart" class="center" onclick="settings.restart()"></button>
|
|
</div>
|
|
|
|
<div class="switch acTheme">
|
|
<select name="theme" data-setting="windowStyle" class="left dropdown">
|
|
<option value="" disabled selected hidden data-string="settings-theme"></option>
|
|
<option value="default" data-string="settings-theme-default"></option>
|
|
<option value="native" data-string="settings-theme-native"></option>
|
|
</select>
|
|
|
|
<p class="header" data-string="settings-theme"></p>
|
|
|
|
<div class="description">
|
|
<p data-string="settings-theme-desc1"></p>
|
|
<b data-string="settings-theme-default"></b> -
|
|
<span data-string="settings-theme-desc2"></span>
|
|
<br />
|
|
<b data-string="settings-theme-native"></b> -
|
|
<span data-string="settings-theme-desc3"></span>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acCSP">
|
|
<label class="header">ArmCord CSP</label>
|
|
<input id="csp" class="tgl tgl-light left" data-setting="armcordCSP" type="checkbox" />
|
|
<label class="tgl-btn left" for="csp"></label>
|
|
<p class="description" data-string="settings-csp-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acTray">
|
|
<label class="header" data-string="settings-tray"></label>
|
|
<input id="tray" class="tgl tgl-light left" data-setting="minimizeToTray" type="checkbox" />
|
|
<label class="tgl-btn left" for="tray"></label>
|
|
<p class="description" data-string="settings-tray-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acMinimized">
|
|
<label class="header" data-string="settings-startMinimized"></label>
|
|
<input id="startMinimized" class="tgl tgl-light left" data-setting="startMinimized" type="checkbox" />
|
|
<label class="tgl-btn left" for="startMinimized"></label>
|
|
<p class="description" data-string="settings-startMinimized-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acPatches">
|
|
<label class="header" data-string="settings-patches"></label>
|
|
<input id="patches" class="tgl tgl-light left" data-setting="automaticPatches" type="checkbox" />
|
|
<label class="tgl-btn left" for="patches"></label>
|
|
<p class="description" data-string="settings-patches-desk"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acWebsocket">
|
|
<label class="header" data-string="settings-invitewebsocket"></label>
|
|
<input id="websocket" class="tgl tgl-light left" data-setting="inviteWebsocket" type="checkbox" />
|
|
<label class="tgl-btn left" for="websocket"></label>
|
|
<p class="description">
|
|
<!-- TODO add data-string -->
|
|
Uses <a target="_blank" href="https://github.com/OpenAsar/arrpc">arRPC</a> to support Discord RPC (Rich
|
|
Presence) with local programs on your machine. Work in progress.
|
|
</p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acMobileMode">
|
|
<label class="header" data-string="settings-mobileMode"></label>
|
|
<input id="mobile" class="tgl tgl-light left" data-setting="mobileMode" type="checkbox" />
|
|
<label class="tgl-btn left" for="mobile"></label>
|
|
<p class="description" data-string="settings-mobileMode-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acAltPaste">
|
|
<label class="header" data-string="settings-altPaste"></label>
|
|
<input id="alternativePaste" class="tgl tgl-light left" data-setting="alternativePaste" type="checkbox" />
|
|
<label class="tgl-btn left" for="alternativePaste"></label>
|
|
<p class="description" data-string="settings-altPaste-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acAutogain">
|
|
<label class="header" data-string="settings-disableAutogain"></label>
|
|
<input id="disableAutogain" class="tgl tgl-light left" data-setting="disableAutogain" type="checkbox" />
|
|
<label class="tgl-btn left" for="disableAutogain"></label>
|
|
<p class="description" data-string="settings-disableAutogain-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acDynamicIcon">
|
|
<label class="header" data-string="settings-dynamicIcon"></label>
|
|
<input id="dynamicIcon" class="tgl tgl-light left" data-setting="dynamicIcon" type="checkbox" />
|
|
<label class="tgl-btn left" for="dynamicIcon"></label>
|
|
<p class="description" data-string="settings-dynamicIcon-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acChannel">
|
|
<select name="channel" data-setting="channel" class="left dropdown">
|
|
<option value="stable" selected>Stable</option>
|
|
<option value="canary">Canary</option>
|
|
<option value="ptb">PTB</option>
|
|
</select>
|
|
|
|
<div>
|
|
<p class="header" data-string="settings-channel"></p>
|
|
<div class="description">
|
|
<p data-string="settings-channel-desc1"></p>
|
|
<b>Stable</b> - <span data-string="settings-channel-desc2"></span>
|
|
<br />
|
|
<b>Canary</b> - <span data-string="settings-channel-desc3"></span>
|
|
<br />
|
|
<b>PTB</b> -
|
|
<span data-string="settings-channel-desc4"></span>
|
|
<br />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acClientMod">
|
|
<select name="mod" data-setting="mods" class="left dropdown">
|
|
<option value="none" data-string="settings-none" selected></option>
|
|
<option value="vencord">Vencord</option>
|
|
<option value="shelter">Shelter</option>
|
|
</select>
|
|
|
|
<p class="header" data-string="settings-mod"></p>
|
|
<div class="description">
|
|
<p data-string="settings-mod-desc1"></p>
|
|
<b>Vencord</b> - <span data-string="settings-mod-vencord"></span>
|
|
<br />
|
|
<b>Shelter</b> - <span data-string="settings-mod-shelter"></span>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acPrfmMode">
|
|
<select name="prfmMode" data-setting="performanceMode" class="left dropdown">
|
|
<option value="none" data-string="settings-none" selected></option>
|
|
<option value="performance" data-string="settings-prfmMode-performance"></option>
|
|
<option value="battery" data-string="settings-prfmMode-battery"></option>
|
|
</select>
|
|
|
|
<p class="header" data-string="settings-prfmMode"></p>
|
|
<p class="description" data-string="settings-prfmMode-desc"></p>
|
|
</div>
|
|
<br />
|
|
|
|
<div class="switch acTray">
|
|
<select name="trayIcon" data-setting="trayIcon" class="left dropdown">
|
|
<optgroup label="- Discord -">
|
|
<option data-string="settings-trayIcon-dynamic" value="default" selected></option>
|
|
<option data-string="settings-trayIcon-normal" value="dsc-tray"></option>
|
|
<option data-string="settings-trayIcon-normal" value="clsc-dsc-tray"></option>
|
|
</optgroup>
|
|
|
|
<optgroup label="- ArmCord -">
|
|
<option data-string="settings-trayIcon-colored-plug" value="ac_plug_colored"></option>
|
|
<option data-string="settings-trayIcon-white-plug" value="ac_white_plug"></option>
|
|
<option data-string="settings-trayIcon-white-plug-alt" value="ac_white_plug_hollow"></option>
|
|
<option data-string="settings-trayIcon-black-plug" value="ac_black_plug"></option>
|
|
<option data-string="settings-trayIcon-black-plug-alt" value="ac_black_plug_hollow"></option>
|
|
</optgroup>
|
|
</select>
|
|
|
|
<p class="header" data-string="settings-trayIcon"></p>
|
|
<p class="description" data-string="settings-trayIcon-desc"></p>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
|
|
<div class="switch acAdvSettings">
|
|
<h1 data-string="settings-advanced" class="center advancedText"></h1>
|
|
<br />
|
|
<br />
|
|
|
|
<div>
|
|
<label class="header" data-string="settings-skipSplash"></label>
|
|
<input id="skipSplash" class="tgl tgl-light left" data-setting="skipSplash" type="checkbox" />
|
|
<label class="tgl-btn left" for="skipSplash"></label>
|
|
<p data-string="settings-skipSplash-desc" class="description"></p>
|
|
</div>
|
|
<br />
|
|
<div>
|
|
<label class="header" data-string="settings-useLegacyCapturer"></label>
|
|
<input
|
|
id="useLegacyCapturer"
|
|
class="tgl tgl-light left"
|
|
data-setting="useLegacyCapturer"
|
|
type="checkbox"
|
|
/>
|
|
<label class="tgl-btn left" for="useLegacyCapturer"></label>
|
|
<p data-string="settings-useLegacyCapturer-desc" class="description"></p>
|
|
</div>
|
|
<br />
|
|
<button data-string="settings-pluginsFolder" data-open="Plugins" class="center"></button>
|
|
<br />
|
|
<button data-string="settings-themesFolder" data-open="Themes" class="center"></button>
|
|
<br />
|
|
<button data-string="settings-storageFolder" data-open="Storage" class="center"></button>
|
|
<br />
|
|
<button data-string="settings-crashesFolder" data-open="Crashes" class="center"></button>
|
|
<br />
|
|
<button
|
|
data-string="settings-copyDebugInfo"
|
|
id="settings-copyDebugInfo"
|
|
class="center"
|
|
onclick="settings.copyDebugInfo()"
|
|
></button>
|
|
<br />
|
|
<button
|
|
data-string="settings-forceNativeCrash"
|
|
id="settings-forceNativeCrash"
|
|
class="center"
|
|
onclick="settings.crash()"
|
|
></button>
|
|
</div>
|
|
</body>
|
|
|
|
<script>
|
|
document.querySelectorAll("[data-string]").forEach(async (el) => {
|
|
el.textContent = await settings.getLang(el.dataset.string);
|
|
});
|
|
|
|
const elements = document.querySelectorAll("[data-setting]");
|
|
elements.forEach(async (e) => {
|
|
const value = await settings.get(e.dataset.setting);
|
|
if (e.tagName == "SELECT") e.value = value;
|
|
else e.checked = value;
|
|
});
|
|
|
|
function saveSettings() {
|
|
const elements = Array.from(document.querySelectorAll("[data-setting]"));
|
|
const obj = Object.fromEntries(
|
|
elements.map((e) => [e.dataset.setting, e.tagName === "SELECT" ? e.value : e.checked])
|
|
);
|
|
|
|
obj.doneSetup = true;
|
|
settings.save(obj);
|
|
|
|
const doRestart = confirm(`Your settings have been saved!
|
|
Some changes may require the app to restart before taking effect, would you like to do so now?`);
|
|
if (doRestart) settings.restart();
|
|
}
|
|
|
|
document.querySelectorAll("[data-open]").forEach((e) => {
|
|
e.addEventListener("click", settings[`open${e.dataset.open}Folder`]);
|
|
});
|
|
</script>
|
|
</html>
|